Solved

ASP.NET / VB: Newlines inside code

Posted on 2012-03-24
6
361 Views
Last Modified: 2012-03-25
When using ASP.NET / VB, how can I add new lines in the following?

This gives an error:

<p>
<%=AutoFormat("Hello Line 1
Line 2
Line3
Line 4")%>
</p>

Open in new window

0
Comment
Question by:hankknight
[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
6 Comments
 
LVL 5

Expert Comment

by:Rainverse
ID: 37761941
Just a simple <br> should do it.
0
 
LVL 16

Author Comment

by:hankknight
ID: 37762008
No, I am looking for a newline, not HTML!  In Linux I can do this by using \n however that does not seem to work here.
0
 
LVL 5

Expert Comment

by:Rainverse
ID: 37762057
VbCrLf
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 168 total points
ID: 37762201
'VbCrLf' would be the correct answer... except that <p></p> are HTML tags where <br> is the correct answer.  What are you trying to do?
0
 
LVL 10

Assisted Solution

by:himanshut
himanshut earned 166 total points
ID: 37762275
You may be looking for System.Environment.NewLine

Refer this: http://msdn.microsoft.com/en-us/library/system.environment.newline.aspx

By adding System.Environment.NewLine, it would act as <br> but in code behind for c# or vb.net

Cheers
0
 
LVL 17

Accepted Solution

by:
nepaluz earned 166 total points
ID: 37762461
use one of the following: VbNewLine, VbCrLf and <br />
0

Featured Post

Independent Software Vendors: 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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

737 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