如何动态创建文本框

问题描述:

如何在asp.net中动态创建标签和文本框并将其值提交给数据库?
请帮助我.

How can I dynamically create a label and a textbox in asp.net and submit their value to the database?
Please help me.

这里是一个很好的参考链接.另外,请先按照引言中给出的链接进行操作.

http://www.4guysfromrolla.com/articles/092904-1.aspx [ ^ ]

祝你好运!
Here''s a good link for reference. Also, first follow the links given in the introduction first.

http://www.4guysfromrolla.com/articles/092904-1.aspx[^]

Good luck!


浏览下面的Google搜索链接
^ ]
Go through the below Google Search Link
Create Dynamic Controls in Asp.net[^]


写在Page_Load
{
labal l = new label();
l.text ="tom";
this.controls.add(l);
}
它将动态创建标签,然后您可以将其值存储在变量中
并作为参考传递到数据库表//:)
write on Page_Load
{
labal l=new label();
l.text="tom";
this.controls.add(l);
}
it will create label dynamically and then u can store its value in a variable
and pass as a reference in database table// :)