burak Posted September 30, 2003 Posted September 30, 2003 Hello, I have a text area in one panel. The text area contains "Analyze systems Design systems Test systems" I have a label in another panel. <TD vAlign="top" align="left"> <asp:Label id="lblJobDesc" runat="server"></asp:Label> </TD> I assign the textarea's value to the label as follows lblJobDesc.Text = txtJobDesc.Value but for some reason, the carriage returns don't appear and the three rows appear next to each other. How can I show these three distinct rows in a label control? Thank you, Burak Quote
*Gurus* Derek Stone Posted September 30, 2003 *Gurus* Posted September 30, 2003 Carriage returns and line feeds have no significance in HTML. You'll need to convert them to break tags. <br /> Quote Posting Guidelines
burak Posted October 1, 2003 Author Posted October 1, 2003 Here is my code Dim strJobDesc As String strJobDesc = txtJobDesc.Text Replace(strJobDesc, vbCrLf, "<BR>") lblJobDesc.Text = strJobDesc as you can see I am trying to replace the carriage return-line feed with "<BR>" but this did not work for me. Did you have any other ideas? Thanks, Burak Quote
fadi Posted October 1, 2003 Posted October 1, 2003 u'll need to replace lblJobDesc.Text = txtJobDesc.Value by lblJobDesc.Text = Replace(Trim(txtJobDesc.Value), Chr(13), "<br/>") Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.