473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Text to next line in C#

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><brin 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
Nov 11 '08 #1
1 2712
I found out what it was.

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

Thanks,

Tom
"tshad" <tf*@dslextreme.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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><brin 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

Nov 11 '08 #2

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

Similar topics

4
by: Rick | last post by:
I am fairly new to XML, I have an XML document that holds configurations for an ASP.NET application, within the configuration XML File I have a line of text that will feed into a lable on a web...
5
by: Johnny Meredith | last post by:
I have seven huge fixed width text file that I need to import to Access. They contain headers, subtotals, etc. that are not needed. There is also some corrupt data that we know about and can...
5
by: osmethod | last post by:
Hello, I'd appreciate any help which is offered to my problem. I'm using Acess 97. I have a flat text file which lists names and addresses. Sometimes, these can be 4 lines and sometimes 5...
36
by: Wei Su | last post by:
Hi, I have a text file abc.txt and it looks like: 12 34 56 23 45 56 33 56 78 ... .. .. ... .. .. I want to get how many rows totally in the text file, how to do this? Thanks.
14
by: Joe | last post by:
Hello All: I am trying to dynamically populate a web page with literal content and controls (textboxes and checkboxes (and eventually two buttons - the buttons do not appear in the code yet). I...
1
by: jeguillo | last post by:
I am trying to retrieve the text within each cell in a datagrid in order to change the color of each cell, depending on the value within that cell. This works fine on the cells that are bound...
0
by: richardkreidl | last post by:
I have the following hash script that I use to compare two text files. 'Class Public Class FileComparison Public Class FileComparisonException Public Enum ExceptionType U 'Unknown A 'Add...
9
by: sicvic | last post by:
I was wondering if theres a way where python can read through the lines of a text file searching for a key phrase then writing that line and all lines following it up to a certain point, such as...
5
by: Carstonio | last post by:
I use ASP to display links to Word documents on an intranet. Is there a way in ASP to do text searches on the documents' contents? I want the results to have the link to the Word document plus two...
6
by: Jacob Rael | last post by:
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.