Solved

New line in a ASP.NET label

Posted on 2009-06-29
7
828 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

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

Author Comment

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net 'Newtonsoft' is not declared. It may be inaccessible due to its protection level. 5 126
Web page design problem 3 39
vb.net code 9 26
Datatable / Dates ? 4 25
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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