Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Make a server side but put up a Confirm MsgBox

Reply
Thread Tools

Make a server side but put up a Confirm MsgBox

 
 
Rod
Guest
Posts: n/a
 
      03-12-2007
I have a server side button that deletes something. I want to put up a
Confirm MsgBox that says "Do you really want to delete this?"
I know how to make a client side button put up this message but I can't see
how to get a server side button to do it.

Many thanks in advance
Rod



 
Reply With Quote
 
 
 
 
Rod
Guest
Posts: n/a
 
      03-12-2007
Easy when you know how.

thanks




"David Longnecker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). com...
> In your code behind, you can still use JavaScript.
>
> Given you have a button object called btnDelete:
>
> Add the following to your Page_Load.
>
> btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want
> to delete?');");
>
> -dl
>
> ---
> David Longnecker
> Web Developer
> http://blog.tiredstudent.com
>
>> I have a server side button that deletes something. I want to put up a
>> Confirm MsgBox that says "Do you really want to delete this?"
>> I know how to make a client side button put up this message but I
>> can't see
>> how to get a server side button to do it.
>> Many thanks in advance
>> Rod

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid question: How can i put two listbox side by side ? momo ASP .Net 2 10-06-2009 08:50 PM
Want to call jscript "confirm" box from VB.NET, but NOT from a but =?Utf-8?B?SlQ=?= ASP .Net 0 03-21-2006 12:14 AM
JavaScript Confirm msgbox... =?Utf-8?B?VEo=?= ASP .Net 3 10-03-2005 03:15 PM
Want to confirm: is it OK to put more than 1 assemblies into oneIIS application Edward Yang ASP .Net 7 01-26-2005 07:31 AM
Re: confirm msgbox in asp.net kong ASP .Net 0 08-27-2003 01:12 AM



Advertisments