Text to next line in C#

T

tshad

In my Web page in 2008, I have a textbox that is set up as:

<asp:TextBox ID="txtStageDisplay" Height="300px" Width="300"
Rows="20" runat="server"></asp:TextBox>


I am trying to write out a bunch of line but I all the data is on one line.
When I do:

txtStageDisplay.Text += "We are at stage: " + e.Stage.ToString() +
"<br><br>";

I get lines that have <br><br> in them.

If I try:

txtStageDisplay.Text += "We are at stage: " + e.Stage.ToString() +
Enviroment.NewLine;

I get:

We are at stage: 1Product ID: 3We are at stage: 2Product ID: 3

How do I write multilines to a textbox?

Thanks,

Tom
 
T

tshad

I found out what it was.

I didn't have the TextBox set to TextMode="Multiline".

Thanks,

Tom
 

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

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top