I have a modal popup that has a targetId to a hidden button. I want the popup to occur when a button in a grid is clicked but that button is programmed behind the code and therefore the targetId would be invalid...
So I wanted to attempt to set the gridview's button's onclientclick event to be the onclientclickevent of that hidden button. Is this possible or should I be going about this another way.
here is how i created the grid button
If Not IsPostBack Then
Dim field As New TemplateField
field.HeaderText = "Sub Departments"
Dim col As DataControlField = field
GridView1.Columns.Add(col)
For i As Integer = 0 To GridView1.Rows.Count - 1
Dim btnview As New ImageButton
btnview.ImageUrl = "\images\icons\xp_ico_search_24x24.gif"
GridView1.Rows(i).Cells(3).Controls.Add(btnview)
Next
End If