Get confirmation from user

  • Thread starter Marc Robitaille
  • Start date
M

Marc Robitaille

Hello,

I use a server side button to delete or update data in my database. To have
a confirmation from the user I use this code that I have found here.

cmdOk.Attributes.Add("OnClick", "return confirm('Do you want to change your
pass word?')")

I put this code in the Page_Load event of my webpage. When I click on the
button, the message box show the question on the screen. I click on Cancel
but the Click event of my server button still execute the code and update
the pass word.

Can someone tell me what I do wrong.

Thank you all!
Marc
 

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

Forum statistics

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

Latest Threads

Top