<ext:Label NOT taking the NEW LINE Character...

  1. #1

    <ext:Label NOT taking the NEW LINE Character...

    I tried \n, Environment.NewLine, vbCrLf, <br\>

    Nothing gets it to the New Line....

    Is there a different Control I can you in Coolite, because the <ext:Label Control is NOT taking the NEW LINE Character ???

    Example is in C#, but I'm using VB.NET...

    .cs
    
    class Program
    {
        static void Main()
        {
    	// 1.
    	// Declare a new StringBuilder.
    	StringBuilder builder = new StringBuilder();
    
    	// 2.
    	builder.Append("The list starts here:");
    
    	// 3.
    	builder.AppendLine();
    
    	// 4.
    	builder.Append("1 cat").AppendLine();
    
    	// 5.
    	// Get a reference to the StringBuilder's buffer content.
    	string innerString = builder.ToString();
    
    	Label1.Text = innerString;
        }
    }
    .aspx
    <ext:Anchor>
             <ext:Label ID="Label1" runat="server" Text="" />
    </ext:Anchor>
    Last edited by RonaldR; Apr 25, 2011 at 8:45 PM. Reason: grammer updated...
  2. #2
    Hi,

    You can set the .Html property of the Label Component if you want to include linebreaks (<br />).

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Label1.Html = "Line One <br /> Line Two";
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Label ID="Label1" runat="server" />
        </form>
    </body>
    </html>
    Geoffrey McGill
    Founder
  3. #3

    [CLOSED]: <ext:Label NOT taking the NEW LINE Character...

    works...

    Thank you...

Similar Threads

  1. [CLOSED] column chart label line wrapping
    By CarpFisher in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Jul 05, 2012, 12:12 PM
  2. Replies: 2
    Last Post: Mar 16, 2012, 7:09 PM
  3. [CLOSED] Label on the same line of buttons in window
    By xeo4.it in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 13, 2011, 11:13 AM
  4. [CLOSED] CSS is taking for all the TextArea controls that I create
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 25, 2010, 8:28 PM
  5. New line character literal in message box
    By kumarxlnt in forum 1.x Help
    Replies: 4
    Last Post: Sep 30, 2009, 9:23 AM

Posting Permissions