|
在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
可以弹出窗口
我想把
button.attributes.add("onclick","return confirm('que ren shan chu?');")
换成
button.attributes.add("onclick","window.open('aa.aspx?id='&e.item.cells(0).text &'')")
怎么不行?
另外 我把
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
代码放到datagrid1_itemcommand事件中 怎么出不来弹出框?
这个问题怎么解决? |
|