is there any control for "<br>"?

Q

Quentin Huo

Hi,

I am trying to dynamically create <asp:TextBox> controls in a page, like:


Label lbl = new Label();



TextBox1 = new TextBox();

TextBox1.ID = "TextBox1";

......



TextBox2 = new TextBox();

TextBox2.ID = "TextBox2";

......



lbl.Controls.Add(TextBox1);

lbl.Controls.Add(TextBox2);


I want to put the "TextBox1" and "TextBox2" in the different line, just like
there is a "<br>" between them. But what is the webControl for "<br>"? Maybe
there is another way to do this?

Thanks


Q.
 
M

MichalR

Quentin said:
Hi,

I am trying to dynamically create <asp:TextBox> controls in a page, like:


Label lbl = new Label();



TextBox1 = new TextBox();

TextBox1.ID = "TextBox1";

......



TextBox2 = new TextBox();

TextBox2.ID = "TextBox2";

......



lbl.Controls.Add(TextBox1);

lbl.Controls.Add(TextBox2);


I want to put the "TextBox1" and "TextBox2" in the different line, just like
there is a "<br>" between them. But what is the webControl for "<br>"? Maybe
there is another way to do this?

Thanks


Q.
lbl.Controls.Add(new HTMLGenericControl("BR")) ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top