Thursday, March 29, 2012

Pop Up windows

Hello,
What is the best approach to bringing up pop-up windows to verify a users
request. (i.e. - "Are you sure you want to delete? yes no)
I know how to bring the window up in javascript...but once the user click
"yes" in the new pop-up window, I need to somehow invoke a delete call in
the c# code behind of the original page.
Any help would be appreciated.
Thanks.Using either a Button or LinkButton control, you can add the "onclick"
attribute to it and place the javascript code in there.
For example:
lnkCancel.Attributes.Add("onclick", "return window.confirm('Are you sure
you want to cancel this order?');");
If the user clicks OK, the button will submit and the appropriate
code-behind for the button will be executed. If the user clicks cancel,
then the form will not submit.
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com
"Bilbo" <Bilbo@.cox.net> wrote in message
news:OcSpUe6iEHA.3876@.TK2MSFTNGP15.phx.gbl...
> Hello,
> What is the best approach to bringing up pop-up windows to verify a users
> request. (i.e. - "Are you sure you want to delete? yes no)
> I know how to bring the window up in javascript...but once the user click
> "yes" in the new pop-up window, I need to somehow invoke a delete call in
> the c# code behind of the original page.
> Any help would be appreciated.
> Thanks.
>

0 comments:

Post a Comment