[求助]请问如何在APS.NET中取window.confirm的值?
比如我要删除DataGrid中的某列,在删除前需要弹出一个对话框来询问是否真的删除,请问如果取这个对话框的值?就是window.confirm的值,如果返回true就执行,返回false就不执行,请赐教,谢谢!
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
Dim mydeletebutton As Button
mydeletebutton = e.Item.FindControl("btndelete")
mydeletebutton.Text = "删除此行"
mydeletebutton.Attributes.Add("onclick", "return confirm('你真的要删除此行吗?')")
End Select
Private Sub datagrid_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles datagrid.ItemCommand
If e.CommandName = "btdelete" Then
写你要删除数据库的代码
end if
end sub