message box with OK and CANCEL buttons

How to dreate a Message box with OK and Cancel button. And how to verify which button is pressed

How to add text boxess inside Message box.

 

thanks and regard

sankar 

 

-2
sankarganga
8/13/2007 2:07:42 PM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 3 Replies
👁️‍🗨️ 2929 Views

I had the same problem myself. It became obvious to me that client side pop-ups, alerts etc... weren't gonna do the job.

 So I used this:

http://www.codeproject.com/aspnet/Web_Message_Box.asp

very easy to use and does the job!!
 

1
richiej
8/13/2007 2:52:04 PM

if a plain javascript alert is what you need, then it is simply:

var res = confirm("Are you sure?");

res is true if user cliked OK and false if they clicked cancel.

if you need to use that to control execution of a postback, you can add as client-side onclick:

return confirm('Are you sure?');

example:

/tharn 

 

1
Tharn
8/13/2007 3:00:30 PM

 Just answered this one for someone else...

http://forums.asp.net/p/1145040/1855121.aspx#1855121

 


Visit my blog
1
Lee
8/13/2007 3:05:41 PM