摘要: 若用string cdept =((HtmlInputText)FindControl("dept0" + i.ToString())).Value;提示结果为空值,即无法找到控件。改为:string cdept =((HtmlInputText)post01.FindControl("dept0" + i.ToString())).Value;post01是页面的一个控件名称(只要是页面的控件名称都可以)原理:FindControl方法是根据ID在Control所在的命名容器中寻找相应控件。当执行TextBox1.FindControl("B 阅读全文
posted @ 2013-09-25 16:05 欧阳峰再战江湖 阅读(414) 评论(0) 推荐(0) 编辑