Text to next line in C#

  • Thread starter Thread starter tshad
  • Start date Start date
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
 
I found out what it was.

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

Thanks,

Tom
 
Back
Top