R
raju
Hai,
I am new to ASP.NET, in my application, datagird, itemtemplate, i
am having delete button. If i click that button, I am calling
DeleteCommand,
in that procedure i written the code as given below.
Protected Sub dlTask_DeleteCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataListCommandEventArgs) Handles
dlTask.DeleteCommand
Dim obutton As Button
obutton = CType(e.Item.FindControl("btnDelete"), Button)
obutton.Attributes.Add("onClick", "alert('Do you want to
Delete?');")
End Sub
When i run this code, If i click the button first time, it doesn't
work. From the second time onwards the alert is working.
What i have to do, to correct this problem?.
Regards,
Raju.
I am new to ASP.NET, in my application, datagird, itemtemplate, i
am having delete button. If i click that button, I am calling
DeleteCommand,
in that procedure i written the code as given below.
Protected Sub dlTask_DeleteCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataListCommandEventArgs) Handles
dlTask.DeleteCommand
Dim obutton As Button
obutton = CType(e.Item.FindControl("btnDelete"), Button)
obutton.Attributes.Add("onClick", "alert('Do you want to
Delete?');")
End Sub
When i run this code, If i click the button first time, it doesn't
work. From the second time onwards the alert is working.
What i have to do, to correct this problem?.
Regards,
Raju.