Confirm in codebehind

R

rkmoray

I am using c# codebehind. I need a confirm box to determine if the
data is to be saved or not.
Ho do I determine which button was seleected?

RegisterStartupScript("startupScript", "<script
language=JavaScript> if (confirm('This will replace the existing
data table for the selected date and time. Are you sure you with to
continue')) ; </script>");
 
C

Curt_C [MVP]

assing it to the button.
cmdSave.Attributes.Add("onclick","javascript:if(confirm('Are you sure you
wish to delete this Signup Sheet?')== false) return false;");

This will only fire the code-behind click event if the clicked the OK

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


rkmoray said:
I am using c# codebehind. I need a confirm box to determine if the
data is to be saved or not.
Ho do I determine which button was seleected?

RegisterStartupScript("startupScript", "<script
language=JavaScript> if (confirm('This will replace the existing
data table for the selected date and time. Are you sure you with to
continue')) ; </script>");
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top