Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's ol' good CRLF equivalent in C#/ASP.NET?

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
566
0
16
US
Colleagues,
The Subject line says it.
I wouldn't bother you with such trivial matter, but I can't find anything in MS's documentation, neither can recall what it was in ol' good C/C++ (last worked with it in mid-late 1990s)... so:
I need to assign a 2-lines text to, say, Label, or TextBox, or Button object on a (Web) form.
I tried this:

Code:
lblQuantityExceeded.Text = "Number of items requested must be" + (13).ToString() + "between 1 and " + lblOnHandCount.Text + "!";

and it didn't work: the line displayed was "Number of items requested must be13between 1 and 40!"
Hence the question in Subject.
Please advise!

And BTW, I do not see MultiLine (or similar) property in any of those aforementioned controls in ASP.NET - where did they go?

Regards,

Ilya
 
Same as C. Use \r for carriage return \n for newline.

If you are generating HTML, try <br/>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top