Use this code in the Datalist or Repeter itemDataBound Event....
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
ImageButton db = (ImageButton)e.Item.FindControl("imgbtnDelete");
// Assign the Delete button's OnClientClick property
db.OnClientClick = string.Format("return confirm('Are you sure you want to delete this topic?');");
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment