跟踪发现: Trim(e.Item.Cells(1).Text) 的值是正确的,但e.Item.Cells(0).Text的值则为'',第0列为模板列,是web代码错了吗,帮我改改吧,哪里错了,急啊!
解决方案 »
- GridView动态生成的CommandField更新update按钮无反应,RowUpdating函数不执行任何操作
- ckeditor+ckfinder上传附件后显示全路径
- 请教一个文章详细页面缓存方案!
- 请问csdn里面的等级图标具体是怎么实现的?好像看不到<img>标签
- 怎样将上传图片生成缩略图,并存入数据库.存入服务器硬盘或者显示的不要回答,太多了.请看清我的题目.
- 如何格式化DataField="XLH",将取消小数点后面4位小数呢?
- 如何做这样的报表?(水晶报表)
- 寻求基于.Net的bug软件 最好是asp.net(c#)!拒绝灌水!顶之类
- 如何转向其他盘符目录
- 为什么用OleDbCommand插入数据时出错提示:“操作必须使用一个可更新的查询”?
- 昨天没有解决的问题。请大家帮帮忙(在线等)
- 请问我想限制textbox输入的东西,要怎么做?
Dim strSqlDel As String
strSqlDel = "delete from aLine_User_Temp where user_id='" & Trim(txtUser_Code.Text) & "' and line_code='" & Trim(e.Item.Cells(0).Text) & "'" ???????why????????? ExecuteSQL(strSqlDel) grdLine.EditItemIndex = -1
BindGridLine(strSqlLine, "tblLineUser")
End Sub
<asp:label id="ShowCode" runat=server text='<%# DataBinder.Eval(Container.DataItem, "customer_code") %>'></asp:label>在你的DeleteCommand中取Label值
Label lb=(Label)e.Item.Cells[0].Controls[0];
Response.Write(lb.Text):或者使用FindControl来查找控件,并取值
Label lb=(Label)e.Item.FindControl("ShowCode");
Resposne.Write(lb.Text);