Solved

New line in a ASP.NET label

Posted on 2009-06-29
7
822 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
Comment Utility
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
Comment Utility
You can use
label.Text = "some warning text here" & variable & vbNewLine & "text continue here"
 
0
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
Opps! To slow :)
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:Nyana22
Comment Utility
vbcrlf
didn't work
0
 

Author Comment

by:Nyana22
Comment Utility
even vbNewLine didnt work!
0
 
LVL 22

Accepted Solution

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

Author Closing Comment

by:Nyana22
Comment Utility
thanks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

9 Experts available now in Live!

Get 1:1 Help Now