The idea is basically to hook either the onclick of the button you're submitting from or the onsubmit event of the form.
The easiest way to do this is to simply put the confirm code into the HTML the ASPX and attach it to the appropriate object. Alternately you can do this in code as well by using the Attributes collection of the control and adding the handler as an attribute.
+++ Rick ---
>Hi All,
>
>First, I know there is no equivalent messagebox functionality in ASP.Net as there is in .Net WinForms, bummer, but understandable. And I've done some poking around on the net and have a basic idea about how to handle the scenerio of presenting confirm dialogs from server side code.
>
>My understanding is if I want to present a confirm dialog from a method in my code behind, I need to run a client-side javascript function and return a result to my method from the javascript function or I can call another .aspx page and return a value.
>
>I found this related post on the ASP.Net forums,
http://www.asp.net/Forums/ShowPost.aspx?tabindex = 1&PostID=230280. I downloaded the moderators DialogWindow control from
http://www.metabuilders.com/tools/DialogWindow.aspx. I looked through the accompanying help file and kind of see what the deal is but basically and secondly, I'm confused and need some help.
>
>I'm sure that many of you have been down this road already. What is a good methodolgy to handle this? Did you build another .aspx page and are you calling it and returning a value, or is the client-side javascript the preferred option?
>
>Thanks,