如何创建动态文本框? [英] How to create dynamic textboxes?
本文介绍了如何创建动态文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在asp.net,c#中创建动态文本框?
谢谢!
How to create dynamic textboxes in asp.net,c#?
Thanks!
推荐答案
嗨
我相信,您想在运行时创建一个文本框.如果是这样,请尝试在Page_Init中遵循以下代码.
Hi
I believe, you want to create a textbox at run-time. If so, try following code in Page_Init.
TextBox1 = New TextBox();
TextBox1.ID = "txtMyTextBox";
TextBox1.Style("Position") = "Absolute";
TextBox1.Style("Top") = "50px";
TextBox1.Style("Left") = "200px";
Form1.Controls.Add(TextBox1);
希望有帮助.
-Milind
Hope that helps.
-Milind
这篇关于如何创建动态文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文