Click here to Skip to main content
15,896,453 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: File download prompt Pin
Frank Kerrigan30-Jun-06 6:28
Frank Kerrigan30-Jun-06 6:28 
QuestionCapturing an image of a PDF? Pin
Goalie3530-Jun-06 5:40
Goalie3530-Jun-06 5:40 
AnswerRe: Capturing an image of a PDF? Pin
Frank Kerrigan30-Jun-06 6:24
Frank Kerrigan30-Jun-06 6:24 
QuestionNeed help on bring up a java script pop up box when clicked on LinkButton. Pin
Slow Learner30-Jun-06 4:16
Slow Learner30-Jun-06 4:16 
AnswerRe: Need help on bring up a java script pop up box when clicked on LinkButton. Pin
Paddy Boyd30-Jun-06 4:21
Paddy Boyd30-Jun-06 4:21 
GeneralRe: Need help on bring up a java script pop up box when clicked on LinkButton. Pin
Slow Learner30-Jun-06 4:45
Slow Learner30-Jun-06 4:45 
GeneralRe: Need help on bring up a java script pop up box when clicked on LinkButton. Pin
Paddy Boyd30-Jun-06 4:50
Paddy Boyd30-Jun-06 4:50 
AnswerRe: Need help on bring up a java script pop up box when clicked on LinkButton. [modified] Pin
l0kke30-Jun-06 4:50
l0kke30-Jun-06 4:50 
I think that paddyboyd proposed you a good solution, but if you want to keep your server side code, then you can store value returned from confirm(...) box to a hidden field and then just read it from this field on server side.

You didn't mention which version of .NET you are using, but in ASP.NET 2.0 it should be roughly like this:

<asp:HiddenField runat="sever" id="myHiddenField"/>

protected void Page_Load(object sender EventArgs e)
{
_lnkDLpurchase.Attributes.Add("OnClientClick",
"document.getElementById("myHiddenField").Value = (confirm('Will Lessee buy this vehicle?')) ?
"lease" : "dealer");
_lnkDLpurchase.Attributes.Add("OnClick", "_lnkDLpurchase_Click");
}

protected void _lnkDLpurchase_Click(object sender EventArgs e)
{
switch(myHiddenField.Value)
{
case "lease": ...
case "dealer": ...
}
}

I wrote it from head, maybe there are mistakes but I hope you understand what I mean.
I hope it helps.

-- modified at 11:00 Friday 30th June, 2006
GeneralRe: Need help on bring up a java script pop up box when clicked on LinkButton. Pin
Slow Learner30-Jun-06 5:10
Slow Learner30-Jun-06 5:10 
GeneralRe: Need help on bring up a java script pop up box when clicked on LinkButton. Pin
Slow Learner30-Jun-06 5:15
Slow Learner30-Jun-06 5:15 
AnswerRe: Need help on bring up a java script pop up box when clicked on LinkButton. Pin
minhpc_bk30-Jun-06 17:29
minhpc_bk30-Jun-06 17:29 
QuestionHow to disable dates in Calender Control. Pin
Muhammad Chitrali30-Jun-06 4:09
Muhammad Chitrali30-Jun-06 4:09 
AnswerRe: How to disable dates in Calender Control. Pin
minhpc_bk30-Jun-06 17:11
minhpc_bk30-Jun-06 17:11 
Questiongood day Pin
bluewavestrider30-Jun-06 4:02
bluewavestrider30-Jun-06 4:02 
AnswerRe: good day Pin
RichardGrimmer30-Jun-06 4:39
RichardGrimmer30-Jun-06 4:39 
GeneralRe: good day Pin
bluewavestrider12-Jul-06 1:50
bluewavestrider12-Jul-06 1:50 
QuestionWhy my site is loading very slow? Pin
Sheel Gohe30-Jun-06 3:41
Sheel Gohe30-Jun-06 3:41 
AnswerRe: Why my site is loading very slow? Pin
Mike Puddephat30-Jun-06 4:01
Mike Puddephat30-Jun-06 4:01 
AnswerRe: Why my site is loading very slow? Pin
RichardGrimmer30-Jun-06 4:40
RichardGrimmer30-Jun-06 4:40 
Questionproblem inside [modified] Pin
sandeep_thakur30-Jun-06 3:10
sandeep_thakur30-Jun-06 3:10 
AnswerRe: problem inside Pin
wEb GuRu...30-Jun-06 6:40
wEb GuRu...30-Jun-06 6:40 
Questiondropdownlist Pin
Ballita30-Jun-06 2:26
Ballita30-Jun-06 2:26 
AnswerRe: dropdownlist Pin
Sushant Duggal30-Jun-06 2:35
Sushant Duggal30-Jun-06 2:35 
AnswerRe: dropdownlist Pin
l0kke30-Jun-06 5:07
l0kke30-Jun-06 5:07 
QuestionCustomPaging in datagrid [modified] Pin
Nagraj Naik30-Jun-06 2:19
Nagraj Naik30-Jun-06 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.