Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete button in datagrid 1

Status
Not open for further replies.

logi2000

Programmer
Joined
Jun 17, 2003
Messages
221
Location
CR
i have a delete button in my datagrid. i would like to put a confirmation window when the user clicks the delete button, and depending on the confirmation window the record will be deleted or not.

is there a way to do that ?
 
by the way i am using ASP.NET
 
button.Attibutes.Add("onClick", "javascript:return confirm('Are You Sure You Wish To Delete This Item ?');");

because the delete button you will probably need to implement this in the onitemdatabound event of the datagrid using an ((ImageButton)e.FindControl("controlName")).Attributes.Add("onClick", "javascript:return confirm('Are You Sure You Wish To Delete This Item ?');");

I am doing the syntax from memory and have been coding in VB for the last couple of months but hopefully you get the idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top