• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 850
  • Last Modified:

CrLf within asp.net codebehind

I am having trouble trying to generate a carriage return/ line feed in asp.net using vb in codebehind. I have tried the <br> I have tried the vbCrLf and here is my latest:

SchInfo = stockNum & ControlChars.CrLf
SchInfo = SchInfo & Office & ControlChars.CrLf
SchInfo = SchInfo & zip & ControlChars.CrLf
 SchInfo = SchInfo & "-------------"

I am looking to have the information appear on 4 separate lines, instead it is showing up on one long line, ignoring the CrLf. the info is to appear within a cell of a table.

Thank You....
0
larrystewart
Asked:
larrystewart
1 Solution
 
DotNetThinkerCommented:
"\r\n"
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
try chr(13)
0
 
Bob LearnedCommented:
What happens when you use the <br /> to insert a hard-break?  Is it that the <td> element has a height specified, and it doesn't grow?

Bob
0
 
ToFroCommented:
Environment.NewLine

vbNewLine
0
 
DotNetThinkerCommented:
You could always create a new table in that cell:

SchInfo = "<table><tr><td>"
SchInfo = stockNum & "</td></tr><tr><td>"
SchInfo = SchInfo & Office & "</td></tr><tr><td>"
SchInfo = SchInfo & zip & "</td></tr><tr><td>"
SchInfo = SchInfo & "-------------" & "</td></tr></table"
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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