how to catch the "YES" or "NO" from the confirm box

G

Grey

i use "this.Page.RegisterStartupScript()" to display the client-side script of confirmation box ...but I want to know that how can I know the user was clicked "YES" or "NO" as I need to do different action for these two choices.


Million Thanks..
 
E

Eliyahu Goldin

Only the client's browser knows what was clicked. So it will have to communicate the response to the server. There is a number of ways of doing this. One of them is to have a hidden input element. Set it's value in a javascript. The element will send the value to the server with the submitted form.

Eliyahu
i use "this.Page.RegisterStartupScript()" to display the client-side script of confirmation box ...but I want to know that how can I know the user was clicked "YES" or "NO" as I need to do different action for these two choices.


Million Thanks..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top