Insert / Add a Carriage Return or Line Feed into a Label

Hi,

I am trying to insert a carriage return or line feed into a label.  I have a web app in ASP.NET with VB.NET in code behind.

I have the following text:

John Smith, 123 Main Street, AnyCity, AnyState 12345-6789

I need to display it as follows in a label:

John Smith
123 Main Street
AnyCity, AnyState 12345-6789

I have tried all of the following but none of them work:

lblSampleLabel.Text = lblSampleLabel.Text & vbCrLf
lblSampleLabel.Text = lblSampleLabel.Text & vbCr
lblSampleLabel.Text = lblSampleLabel.Text & vbLf
lblSampleLabel.Text = lblSampleLabel.Text & "<br>"
lblSampleLabel.Text = lblSampleLabel.Text & vbNewLine
lblSampleLabel.Text = lblSampleLabel.Text & Chr(13)
lblSampleLabel.Text = lblSampleLabel.Text & Chr(10)

I also have the CssClass of the label set to the following item in the Style Sheet:

.MultiLineLabels {
    border-style: solid;
    border-color: #000000;
    border-width: 1px;
    background-color: #ffffff;
    font-size: xx-small;      
    font-family: Verdana;
    color:Black;
    vertical-align:middle;
    text-align:left
    }

Any help or guidance would be greatly appreciated.

Thanks!
RAMCITAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

appariCommented:
this will work

Label1.Text = "John Smith,<br> 123 Main Street, <br> AnyCity, <br> AnyState 12345-6789"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RAMCITAuthor Commented:
Hi appari,

Just realized that this works fine:

lblSampleLabel.Text = lblSampleLabel.Text & "<br>"

That is essentially the same thing as your answer.

I didn't realize that something else was messing it up.  I AM TIRED!! :-D

Thanks anyways!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.