Confirm (MessageBox) in c#, , csharp Thailand
  • 12 years ago

    How can I do the confirm in c# and 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).


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.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor