html代码:
<input type="hidden" id="hdfFactor1" />
<input type="hidden" id="hdfFactor2" />
<input type="hidden" id="hdfFactor3" />
后台代码:
((HtmlInputHidden)this.Page.FindControl("hdfFactor" + num)).Value
————————————————————————————————
//是个webpage容器
this.Page
//获取一个id为 hdfFactor+num 的控件
this.Page.FindControl("hdfFactor" + num);
//强制转换为Html Input Hidden 控件类型,再进行.value操作。
((HtmlInputHidden)this.Page.FindControl("hdfFactor" + num)).Value