hi ,
i am using datagrid template column with imageButton in it
i am deleting the record when the imageButton in the datagrid row is clicked
i want to display the confirm message box before deleting.
i am using the following code in OnDeleteCommand event
Public Sub data_Delete(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs)
CType(e.Item.FindControl("imgBtnDelete"), ImageButton).Attributes.Add("onclick", "return confirm('Are u sure to delete this record');")
'some code to perform delete
bindDataGrid()
End Sub
but this is working for the second time i.e when the button is clicked second time
how to keep this
CType(e.Item.FindControl("imgBtnDelete"), ImageButton).Attributes.Add("onclick", "return confirm('Are u sure to delete this record');")
in page_load.
ny one help plz :confused:
Thanks