| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
共有 1366 人关注过本帖
标题:Datagrid控件updatecommand事件里获取不了新值
取消只看楼主 加入收藏
cql
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2005-4-17
收藏
 问题点数:0 回复次数:0 
Datagrid控件updatecommand事件里获取不了新值
private void Mydatagrid_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
string val=((TextBox)e.Item.FindControl("TextBox1")).Text;
}

为什么当我在TextBox1里输入新值后,按“更新”后TextBox1的值又变回原来的值,而val的值也是TextBox1原来的值。请问应该怎么解决?谢谢!

/pa?p=1:123440016:10" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://wpa./pa?p=1:123440016:10');}" onmousewheel="return imgzoom(this);" alt="" />/msgrd?V=1&Uin=123440016&Site=im.&Menu=yes" target="_blank">点击这里给我发消息
2005-10-31 21:23
快速回复:Datagrid控件updatecommand事件里获取不了新值
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016932 second(s), 10 queries.
Copyright©2004-2025, BC-CN.NET, All Rights Reserved