Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > display message box in ASP.NET when delete command is fired

Reply
Thread Tools

display message box in ASP.NET when delete command is fired

 
 
Next
Guest
Posts: n/a
 
      11-19-2003
I would like to display a message box that says;

"You are about to delete this record. Is this what you want to do?"


I want to do this when the delete command is fired.

How do I do this?

Any help is greatly appreciated!

Aaron


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      11-19-2003
Here is the code is use
if((e.Item.ItemType != ListItemType.Header) && (e.Item.ItemType !=
ListItemType.Footer))

{

LinkButton deleteButton = ((LinkButton)e.Item.Cells[2].Controls[0]);

deleteButton.Attributes.Add("onClick", "event.returnValue=confirm('Are you
sure you wish to delete this item?');");

}


--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Next" <aeverettNO^(E-Mail Removed)*jg^_junk..com> wrote in message
news:(E-Mail Removed)...
> I would like to display a message box that says;
>
> "You are about to delete this record. Is this what you want to do?"
>
>
> I want to do this when the delete command is fired.
>
> How do I do this?
>
> Any help is greatly appreciated!
>
> Aaron
>
>



 
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
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
Embedded <divs> with events: How to prevent the parent div's eventfrom being fired when the embedded div's event is fired? Num GG Javascript 2 11-17-2008 08:56 PM
Handling GridView's delete event fired from a CommandField? gnewsgroup ASP .Net 0 12-13-2007 04:19 PM
Display message when RequiredFieldValidator fired Christian Ista ASP .Net 5 12-07-2004 08:29 AM
How to delete list box(text box) VRao Computer Support 3 01-24-2004 04:58 PM



Advertisments