在daragrid中加了delete列,但是处理事件始终不响应,请各位帮帮忙!
而且我在InitializeComponent中添加了处理事件
private void InitializeComponent()
{
this.datagriddeleteaccount.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.datagriddeleteaccount_DeleteCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
而且我在InitializeComponent中添加了处理事件
private void InitializeComponent()
{
this.datagriddeleteaccount.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.datagriddeleteaccount_DeleteCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
解决方案 »
- asp.net变量的问题
- MemCached1.2.1在Windows下创建服务后访问人数多时服务自动停止!!
- asp.net中的缓存方案
- !!!!!!!!!!!!!!!!!!!!我的下拉框是服务器控件,帮顶数据源后,每当选择里面的值都会蹦回第一个请问为什么?????????
- 如何让dropdownlist显示对应数据库的值的那一项,而不是默认第一项?
- 调查:在一般大型网站会采用何种网页语言?
- 分页的问题?
- 新一代论坛,欢迎光临
- 毕业一年半了。负责开发了一个项目。现在想跳了。
- ASP和ASP.NET的Session变量能共享吗?
- 为什么我的aspx页面老是提示什么活动框架不支持什么~~~~~
- 关于session控件问题
{
}
部分的代吧列出来看看好吗?
SqlConnection myConnection = new SqlConnection(connectionString);
string deleteCmd = "DELETE from Account where id = "+e.Item.Cells[1];
SqlCommand mycommand = new SqlCommand(deleteCmd,myConnection);
mycommand.Connection.Open();
mycommand.ExecuteNonQuery();
mycommand.Connection.Close();
databind();
Response.Write("<script language =javascript > alert('运行!');</script>")
看能不能调用能的话用SqlSever的事件探查器查看Sql 的语句是否正确运行