×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

(OP)
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

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

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

If you are generating HTML, try <br/>

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

(OP)
Thank you, XWB!

Regards,

Ilya

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close