Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

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

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
VBBRett
Asked:
VBBRett
2 Solutions
 
paul_p_vargasCommented:
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
 
joriszwaenepoelCommented:
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

Technology Partners: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now