if (e.Row.RowType == DataControlRowType.DataRow) { string id = ((Label)(e.Row.FindControl("lblproname"))).Text; //cast the ShowDeleteButton link to linkbutton LinkButton lb = (LinkButton)e.Row.Cells[4].Controls[0]; if (lb != null) { //attach the JavaScript function with the ID as the paramter lb.Attributes.Add("onclick", "return ConfirmOnDelete('" + id + "');"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)