carriage return in VB.Net

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
Howcome my Enviroment.NewLine doesnt work?? All shows up on one line. I found this link and tried char(3) and VBCrlf as well but no use. My text box is wide enough. I tried "multiline" property of textbox but i dont want "multiline" and have a scrollbar next to the text box. Howcome this doesnt work?

http://www.xtremedotnettalk.com/showthread.php?t=94136&highlight=Environment.NewLine

Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        txtError.Text = "You do not have access to the System:" & vbCrLf & _
                        "Authenticated: " & Request("Authenticated") & Environment.NewLine & _
                        "Anonymous: " & Request("Anonymous") & Environment.NewLine & _
                        "Type: " & Request("Type") & Environment.NewLine '& _
        '"Error: " & Request("Error")

    End Sub
 
This is ASP.Net.
If I use "multiline", I get the scrollbar which I dont want.

I tried VbNewLine but still all shows up on one line!
 
Yes, without multiline, the vbNewline will only show 1 line. I am not familiar with ASP.net. Does it use the same tool as VB .NET? because is so, look in the properties area. There is a property called "ScrollBArs" and you can set that to "none".
 
Back
Top