how to add client-side confirmation to Delete buttons in a Repeater ??? thanks !!

how to add client-side confirmation to Delete buttons in a Repeater ???

tanks!!
0
rimbaud123
8/9/2005 1:35:38 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
869 Views

Similar Articles

[PageSpeed] 58
Get it on Google Play
Get it on Apple App Store

Please dont use such a big font when asking questions. You question will be even answered when its in a normal font. You can add add a confirm button, in the ItemCreated event. Here is some not tested code.

Protected Sub dg_ItemCreated(ByVal sender as Object, ByVal e as DatagridItemEventArgs) handles dg.ItemCreated

   if e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem then
      CType(e.Item.FindControl("btnID"), Button).Attributes.Add("OnClick", "return confirm('Are you sure?')")
   end if

End Sub


Sonu Kapoor [MVP]
Feel free to ask me any .NET question | Ajax Data Controls Forum
0
SonuKapoor
8/9/2005 2:16:53 AM
Reply: