Hi,
u can follow this code & can get the answer , i used this for an imagebutton
If dgrdEmployee.HasControls = True Then
For i = 0 To dgrdEmployee.Items.Count - 1
Item = dgrdEmployee.Items(i)
strScript = "return askConfirmation ('" & dgrdEmployee.DataKeys(i) & "')"
CType(Item.FindControl("cmdDelete"), ImageButton).Attributes.Add("OnClick", strScript)
Next
End If
s/w engg
|