Question : delete confirm popup on asp hyperlink inside repeater control?

I want to add a confirm delete javascript to my delete hyperlink's inside a repeater control, anyone have any ideas?

Here's my aspx code:


       
       

           

            Delete
       

       

   

Answer : delete confirm popup on asp hyperlink inside repeater control?

Hi alivemedia,

I do, I do....

If this is .NET 2.0, it's very simple:
Delete

.NET 1.1, it's a bit more complicated... I can give you two methods.. the first one I rigged myself:

Delete


The other way is to use the ItemDataBound event for the Repeater.. and do something like:
CType(e.Item.FindControl("DeleteLink"), HyperLink).Attributes.Add("onClick", "return confirm('Are you sure?');")

HTH.
-- Jason
Random Solutions  
 
programming4us programming4us