61,817
社区成员




int thenum = int.Parse(textbox1.Text);
string str = "";
for (int i = 0; i < thenum; i++)
{
TextBox thistext = new TextBox();
//不论是用下面的找页面ID
thistext = (TextBox)Page.Form.FindControl("txtAdd" + i.ToString());
//还是直接获取值
//string gettext = Request.Form["txtAdd" + i.ToString()];
//thistext 或 gettext 都是空的...
if (thistext.Text == "")
{
Response.Write("<script>alert('没有添满!')</script>");
return;
}
else
{
str += thistext.Text + "|";
}
}