Re: Get confirmation from popup before running code in event handler

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Rick Spiewak (rickspiewak_at_mindspring.com)
Date: 05/02/04


Date: Sun, 2 May 2004 00:42:51 -0400

What do you mean "a bunch of them"? Events such as the Javascript one
described below will happen first, as this will prevent the postback from
taking place unless confirmed. On the server side, the page load event will
always fire first, then the onclick event.

"David Jessee" <djessee@houston.rr.com> wrote in message
news:OS%23xL08LEHA.140@TK2MSFTNGP09.phx.gbl...
> This is mostly an academic question....
> I agree this will work in this instance. However, is there a way to
> tell/specify what order the events will fire when you have a bunch of
them?
>
>
> "Candan Akyol" <cakyol@-spamwars-veripark.com> wrote in message
> news:uvBWgx5LEHA.1392@TK2MSFTNGP09.phx.gbl...
> > Place this in the Page_Load event. Note that the first parameter of the
> Add
> > method is the JavaScript "onclick" event and the second parameter is a
> > JavaScript statement.
> >
> > ImageButton1.Attributes.Add("onclick", "if (!confirm('Are you sure?'))
> > return false;");
> >
> > "mg" <mg@theworld.com> wrote in message
> > news:DB2E769C-6908-4AE4-A10A-2C3B9AB19B51@microsoft.com...
> > > I would like the code in the click event handler of an ImageButton to
> run
> > only after a popup confirm appears and the user clicks its 'OK'. The
> > 'CauseValidation' property of the ImageButton is 'true'
> >
> >
>
>


Quantcast