|
In datagrid
Sub DataGrid1_ItemDataBound (sender As Object, e As DataGridItemEventArgs)
dim itemtype as listitemtype
itemtype = e.item.itemtype
if itemtype = listitemtype.item or itemtype = listitemtype.alternatingitem then
dim button as imagebutton
button = ctype (e.Item.FindControl ("ImageButton4"), imagebutton)
'' '' '
button.attributes.add ("onclick", "return confirm ('que ren shan chu?');")
end if
End Sub
Can pop up
I want to
button.attributes.add ("onclick", "return confirm ('que ren shan chu?');")
Replaced with
button.attributes.add ("onclick", "window.open ('aa.aspx? id ='&e.item.cells (0) .text&'')")
Why not?
Also I put
dim itemtype as listitemtype
itemtype = e.item.itemtype
if itemtype = listitemtype.item or itemtype = listitemtype.alternatingitem then
dim button as imagebutton
button = ctype (e.Item.FindControl ("ImageButton4"), imagebutton)
'' '' '
button.attributes.add ("onclick", "return confirm ('que ren shan chu?');")
end if
The code is placed in the datagrid1_itemcommand event.
How to solve this problem? |
|