Solved

ASP.NET / VB: Newlines inside code

Posted on 2012-03-24
6
338 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
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 82

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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

706 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

12 Experts available now in Live!

Get 1:1 Help Now