首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

为何取不到datagrid模版列中textbox的值!

2011-12-13 
为什么取不到datagrid模版列中textbox的值!急在使用DataGrid在线编辑功能时,出现无法取出模块中textBox中

为什么取不到datagrid模版列中textbox的值!急
在使用DataGrid在线编辑功能时,出现无法取出模块中textBox中的内空,以下为取数据的部分代码...

    D_name=(TextBox)e.Item.Cells[1].FindControl( "D_name ");
    D_content   =   (TextBox)e.Item.Cells[2].FindControl( "D_content ");

                Response.Write(D_name.Text);//值为空了


[解决办法]
D_name=(TextBox)e.Item.FindControl( "D_name ");
[解决办法]
你不是不禁用viewstate了

热点排行