1. always assign to ID, for examplein your case hit_btn_id is a control! if you do ToString(), it will give your a class name, use a stringhid_btn_id.ID = "myhidden" + i.ToString();2. you still create those hidden controls dynamically upon postback, then doprivate void Button1_Click(object sender, System.EventArgs e)
{
foreach (Control c in btnPanel.Controls)
{
if (c is TextBox)
Response.Write(((TextBox)c).Text);
else if (c is HtmlInputHidden)
Response.Write(((HtmlInputHidden)c).Value);
}
}
{
foreach (Control c in btnPanel.Controls)
{
if (c is TextBox)
Response.Write(((TextBox)c).Text);
else if (c is HtmlInputHidden)
Response.Write(((HtmlInputHidden)c).Value);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货