62,046
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
Add();
}
private void Add()
{
TextBox td = new TextBox();
td.ID = "ID1";
this.DIVID.Controls.Add(td);
}
protected void OK_OnClick(object sender, EventArgs e)
{
TextBox con = (TextBox)this.form1.FindControl("ID1");
if (con != null)
{
string ddds = con.Text;
}
}
public virtual string Text
{
get
{
string str = (string) this.ViewState["Text"];
if (str != null)
{
return str;
}
return string.Empty;
}
set
{
this.ViewState["Text"] = value;
}
}