Home All Groups Group Topic Archive Search About

Newbie to web side - prompt the user.....

Author
16 May 2005 5:54 PM
UJ
I have a 'delete' button that I need to prompt the user "Are you sure?" on
my web page. It's easy in windows forms. How do you do it on web pages?

TIA

Jeff.

Author
16 May 2005 8:50 PM
Martin
use  javascript: onclick event

Show quoteHide quote
"UJ" <f***@nowhere.com> schreef in bericht
news:efxCCBkWFHA.1240@TK2MSFTNGP14.phx.gbl...
>I have a 'delete' button that I need to prompt the user "Are you sure?" on
>my web page. It's easy in windows forms. How do you do it on web pages?
>
> TIA
>
> Jeff.
>
>
Author
16 May 2005 9:37 PM
Steve C. Orr [MVP, MCSD]
Here's some server side code that uses javascript to display a confirmation
message.

myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in
response to the button click.

Here's a more detailed analysis of your options, including a free control
that can handle many of the options for you.
http://SteveOrr.net/articles/clientsidesuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

Show quoteHide quote
"UJ" <f***@nowhere.com> wrote in message
news:efxCCBkWFHA.1240@TK2MSFTNGP14.phx.gbl...
>I have a 'delete' button that I need to prompt the user "Are you sure?" on
>my web page. It's easy in windows forms. How do you do it on web pages?
>
> TIA
>
> Jeff.
>
>