Solved

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

Posted on 2010-11-08
2
412 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

696 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