new line in C# code

Hello,

I wrote a message and it is too long. I want to make it to line one below the other. This is my code. I am working on C#.

this

.lblMessage.Text="This Broker Name already exist."+"\r"+"Please use another Broker Name or search for Existing Broker.";

It does not work. I would like the text appear this way.

This Broker Name already exist.

Please use another Broker Name or search for Existing Broker.

Can someone help me


guarumal
0
guarumal 3/23/2007 7:11:32 PM
📁 asp.net.faq
📃 380 articles.
⭐ 0 followers.

💬 1 Replies
👁️‍🗨️ 10 Views

Hi,

if you want to display it in a webform you need to use html. So instead of the \r you insert <br/>. Also something else: instead of using \r when writing to a file for example it's better to use Environment.NewLine instead.

Grz, Kris.


Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0
XIII 3/23/2007 7:15:35 PM
Reply: