读书人

findcontrol使用求救解决办法

发布时间: 2012-01-06 22:55:18 作者: rapoo

findcontrol使用求救
请问在ASP.NET中,我用以下一行代码获得datalist控件中edititemtemplate模板中文本框里的内容时,得到的是文本框里没有修改前的内容。
dim newxm as string=ctype(e.item.findcontrol( "xx_xm "),textbox).text


[解决办法]
是否判断回传?
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//绑定数据
}
}

读书人网 >asp.net

热点推荐