With ASP.NET, how do I prompt the user for a yes/no question and getting the result back to my .ascx?
So far I can open a confirmation dialog with use of Javascript, but I can’t return the value. But I don’t know if this is the right approach.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use standart JavaScript
confirm()function to show popup and do Post Back in case of Yes or No. For example:Then on server in
Page_Load()method do:You can also do it async by specifying the first parameter of
__doPostBack()function as ID of any update panel.