Solved

New line in a ASP.NET label

Posted on 2009-06-29
7
823 Views
Last Modified: 2012-05-07
Hello,
I have one ASP.NET web form, which contain a label to display a warning message.
The label is implemented as :

label.Text = "some warning text here" & variable & "text continue here" & ...

I want that the  "text continue here"  will be displayed on a second line in the same label:

 "some warning text here" & variable
 "text continue here" & ...

Can i do this without using another label, thanks,
i am using VB.
0
Comment
Question by:Nyana22
7 Comments
 
LVL 2

Expert Comment

by:Jambyte
ID: 24740029
try:

label.Text = "some warning text here" & variable & vbcrlf & "text continue here"

or maybe you can use an html table that will word wrap the label in a table column?
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24740048
You can use
label.Text = "some warning text here" & variable & vbNewLine & "text continue here"
 
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24740050
Opps! To slow :)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Nyana22
ID: 24740064
vbcrlf
didn't work
0
 

Author Comment

by:Nyana22
ID: 24740073
even vbNewLine didnt work!
0
 
LVL 22

Accepted Solution

by:
Snarf0001 earned 500 total points
ID: 24740160
since asp.net, just insert (br /), but pretend those are angled brackets (don't haveon my phone)
0
 

Author Closing Comment

by:Nyana22
ID: 31598112
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now