I'm sure this is simple but its been driving me nuts!!
Thanks in advance
// "OrderList" Datatlist is nested in the selected item of the "CustomerList" Datalist
OrderList.ItemCreated += new DataListItemEventHandler(this.Item_Created);
private void Item_Created(Object Sender, System.Web.UI.WebControls.DataListItemEventArgs e)
if (e.Item.ItemType == ListItemType.EditItem)
LinkButton _ApproveBtn = (LinkButton)e.Item.FindControl("btnDelete");
_ApproveBtn.Attributes.Add("onClick", "return confirm('Do you wish to delete this order?')");