我爱Aspx >> Asp.Net >> ASP.NET2.0中Gridview中数据操作技巧| protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e){ if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton l = (LinkButton)e.Row.FindControl("LinkButton1"); l.Attributes.Add('onclick", "javascript:return " + "confirm("是否要删除该记录? " + DataBinder.Eval(e.Row.DataItem, "id") + "')"); }} |
| protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e){ if (e.CommandName == "Delete") { int id = Convert.ToInt32(e.CommandArgument); // 删除记录的专门过程 DeleteRecordByID(id); }} |
| protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e){ int categoryID = (int) GridView1.DataKeys[e.RowIndex].Value; DeleteRecordByID(categoryID); } |
ASP.NET 2.0中使用multiview控件[04-21]
ASP.NET 2.0中实现跨页面提交[04-21]
ASP.NET 2.0的页面缓存功能介绍[04-21]
c#.net通用基类[04-21]
共享.Net 图片上传的一个类库的源..[04-21]
.NET 开发人员应该下载的十个必备..[04-21]
ASP.NET中给上传图像加版权信息[04-21]
Asp.net直接保存文件到客户端[04-21]
ASP.NET十七种正则表达试[04-21]
常用的 Asp.Net常用函数库[04-21]
ASP.NET 2.0中使用multiview控件[04-21]
ASP.NET 2.0中实现跨页面提交[04-21]
ASP.NET 2.0的页面缓存功能介绍[04-21]
马化腾大开"胃口..[04-21]
华为正式更换企业新标识[04-21]
众多北京明星住址遭泄 那英别墅价..[04-21]
项目进度的控制、文档的管理重要..[04-21]
用C#编写ActiveX控件(三)[04-21]
用C#编写ActiveX控件(二)[04-21]
用C#编写ActiveX控件(一)[04-21]