ASP.NET 2.0 ProfessionalIf you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I have kind of a multi page form, where on the first page there is a multi-line textarea. This allows you to enter multiple lines in the textarea with carriage returns. On the second page I am displaying the information that was typed into the textarea using a label. The problem is that there are no longer carriage returns so the text all flows together. How do I get the presentation to display in the format in which it was typed with the carriage returns?
FYI - I'm using all server controls. Here are the actual controls:
Dim NewsFile As String = Server.MapPath("~/App_Data/MemberNews.txt")
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim _NewsFile As String = NewsFile.Replace(Chr(13), "<br>")
lblMemberNews.Text = File.ReadAllText(_NewsFile)
End Sub
The label still formats it on the same line, have tired with "/n" but doesnt work...