日期:2014-05-19  浏览次数:20645 次

为什么取不到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了