Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I display a ConfirmButton only on certain conditions?

Status
Not open for further replies.

lmohr79

Technical User
Jan 18, 2005
39
0
0
US
I'm new to AJAX (think the calendar is great) and ASP.NET in general, but I need to create a "confirm message" box when the Save button is clicked, but ONLY if 2 session variable do not equal.

Here's pseudo code:

btnSave_onclick
if session("A") <> session("B") then
display message "do you want to change?"
yes - continue to next page(postback)
no - return to current page (no postback)
else go to next page (postback)

BTW - most of the time session("A") = session("B") so the message is only relevant when the user makes what is a fundamental change.

I've researched the asp.net/AJAX site, but don't see anything that would give me this functionality.

Thanks for any insight!
 
I don't see anything here that is AJAX-related. Are you sure you didn't want the plain old JavaScript forum ( forum216 ), or perhaps when you say AJAX you are talking about the name Microsoft borrowed/purloined/stole for their own ends, in which case you want one of the .net forums?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Thanks for the response Dan - you're right, it should be directed to JavaScript. And I think I'm close to a solution after some more research.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top