Confirm (MessageBox) in c#, asp.net

asp.net , csharp Thailand
  • 12 years ago

    How can I do the confirm in c# and asp.net? The process is,  I have to confirm whether the user is sure that he/she wants to continue. The process of 'continue' is a block of codes (function). If it is yes, it should call the function btnOK_Click. (Is my explanation clear?)

    Please help.. If you need clarifications, please tell me...

     Thanks in advance.. ü

  • 12 years ago

    Hmm, what will I add for if the user clicks on OK, I have to execute a function in the code behind?

    Thanks in advance... ü

  • 12 years ago

    <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return confirm('Are you sure?')" onclick="btnOK_Click" />

  • 12 years ago

    That is what I call answer! Many thanks! Yes

  • 12 years ago

    You are welcome Big Smile and thanks you for the thank you.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone” - Bjarne Stroustrup