Click here to Skip to main content
15,922,166 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to Restrict Selected Webforms Pin
minhpc_bk30-Jun-06 17:07
minhpc_bk30-Jun-06 17:07 
QuestionASP.NET Menu is flaky Pin
gantww30-Jun-06 8:03
gantww30-Jun-06 8:03 
AnswerRe: ASP.NET Menu is flaky - now I'm more confused Pin
gantww30-Jun-06 8:17
gantww30-Jun-06 8:17 
GeneralRe: ASP.NET Menu is flaky - now I'm more confused Pin
gantww30-Jun-06 10:11
gantww30-Jun-06 10:11 
QuestionIndex 0 is not non-negative ! Pin
xuzia30-Jun-06 7:44
xuzia30-Jun-06 7:44 
AnswerRe: Index 0 is not non-negative ! Pin
Dustin Metzgar30-Jun-06 8:02
Dustin Metzgar30-Jun-06 8:02 
AnswerRe: Index 0 is not non-negative ! Pin
Guffa30-Jun-06 8:04
Guffa30-Jun-06 8:04 
QuestionCalender control using jscript Pin
Arun Hegde30-Jun-06 7:14
Arun Hegde30-Jun-06 7:14 
AnswerRe: Calender control using jscript Pin
minhpc_bk30-Jun-06 17:18
minhpc_bk30-Jun-06 17:18 
QuestionFile download prompt Pin
eggie530-Jun-06 6:15
eggie530-Jun-06 6:15 
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 

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.