473,474 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

is there any control for "<br>"?

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.

Nov 18 '05 #1
2 1945
Quentin Huo wrote:
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")) ?
Nov 18 '05 #2
Here is another way...

lbl.Controls.Add(new LiteralControl("<br>"));

AU
"MichalR" <mi*****@nospam.com> wrote in message
news:uH**************@TK2MSFTNGP11.phx.gbl...
Quentin Huo wrote:
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")) ?

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ribchr00 | last post by:
Hi all, I would like to replace line breaks such '+' with '<br />'. Easy task. Problems start when I try to only replace lines that do not end with HTML tags. I tried preg_replace("/+/", "<br...
1
by: Jimbo | last post by:
Hello, I'm not a perl programmer but I can kind of hack my way through some simple scripts. What I am trying to do is get it so a line break <br> is automatically placed when I hit the return...
5
by: Richard Barnet | last post by:
I'm trying to style a line break, something like this: <br class="spacer" /> via CSS, but none of the following seems to have any effect. Any ideas? br.spacer { clear: both; height: 50px;...
6
by: Mason A. Clark | last post by:
LAST WORD(s): 1. MSIE6 and Firefox will go to the top of the page on command <a href="#top">go upsy</a> even if there is NO name="top" or id="top" They know what a "top" is :-) Opera...
4
by: | last post by:
Hello NG! Within a xsl-stylesheet I have an element <xsl:text><!]></xsl:text> If I use that stylesheet to transform some xml-data (to html) with .... pOut = New System.IO.StringWriter
1
by: mmahon512 | last post by:
This works for some of my site. But I have some records that are already marked up as HTML so I am getting extra <br> tags when certain records are marked up with HTML and others are just straight...
1
by: yawnmoth | last post by:
I'm trying to mess around with PHP5's DOM functions and have run into something that confuses me: <?php $dom = new DOMDocument(); $dom->loadHTML('<html></html>'); echo...
1
by: nishac | last post by:
I am using fckeditor 2.3.The problem is that i use shift-enter between paragraphs.But when i see it in the browser I can see double space instead of single space. I noticed that the source of...
3
by: laredotornado | last post by:
Hi, Below I have an unordered list that is displayed on the same horizontal plane (thanks for the help yesterday). What I am wondering now is I would like the contents of the DIV with class...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.