我要在GridView的RowCommand事件中实现判断对话框的弹出
选择了确定才执行后面的操作,选择了取消就不在执行
例:
//读取GridView中选中行的关建字段值
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridView1.SelectedIndex = index;
string UserID = GridView1.SelectedValue.ToString();修改类型
if (e.CommandName == "ModiType")
{
//要在这进行客户端操作后执行后面的操作
//如果用confirm函数选择确定后才执行 否则不执行
}
修改可用点
if (e.CommandName == "ModiDot")
{
//要在这进行客户端操作后执行后面的操作
//如果用confirm函数选择确定后才执行 否则不执行
}}解决了就结贴。在线急等
选择了确定才执行后面的操作,选择了取消就不在执行
例:
//读取GridView中选中行的关建字段值
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridView1.SelectedIndex = index;
string UserID = GridView1.SelectedValue.ToString();修改类型
if (e.CommandName == "ModiType")
{
//要在这进行客户端操作后执行后面的操作
//如果用confirm函数选择确定后才执行 否则不执行
}
修改可用点
if (e.CommandName == "ModiDot")
{
//要在这进行客户端操作后执行后面的操作
//如果用confirm函数选择确定后才执行 否则不执行
}}解决了就结贴。在线急等
在net2003里面是
用findcontrol方法定位按钮,然后利用按钮的attributes.add("onclick","return confirm(‘’)");
http://www.techtoolblog.com/archives/adding-a-confirm-javascript-popup-to-net-gridview
http://blog.devexperience.net/en/7/Confirm_Delete_in_a_GridView.aspxhttp://forums.asp.net/thread/1293482.aspxhttp://www.davidthielen.info/programming/2006/04/delete_confirm_.html