Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

New line in a ASP.NET label

Posted on 2009-06-29
7
Medium Priority
?
833 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

670 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