Solved

How do you skip a line in a vb.net string?

Posted on 2010-11-08
2
410 Views
Last Modified: 2012-06-27
The question I have is pretty simple, how do you skip a line in a vb.net string?  I want it to appear that a return button was pressed while I am building the string.  Thanks!
0
Comment
Question by:VBBRett
[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
2 Comments
 
LVL 3

Accepted Solution

by:
paul_p_vargas earned 250 total points
ID: 34090595
if you want to display it in windows form, it should be this:

myString = "This is my 1st line: " & vbnewline & "this is my 2nd line"
msgbox(myString)

if you want to display it in the web,

myString = myString = "This is my 1st line: <br/> this is my 2nd line"
response.write(myString)

i hope this is what you meant. :)
0
 
LVL 10

Assisted Solution

by:joriszwaenepoel
joriszwaenepoel earned 250 total points
ID: 34090670
I usually use the built-in constant vbCrLf for moving to a new line when building a string.

dim str as string = "Line 1" & vbcrlf & "Line2 & vbcrlf & "Line 3"
0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

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