[RESOLVED]Add line in the end of label text

<dx:ASPxLabel ID="lblGuidingText" ClientInstanceName="lblGuidingText" runat="server" Text="Group Type cannot be modified as it is being used by some procedure instances." +"<br />" Visible="false"
                                                        ToolTip="" ViewStateMode="Disabled" Style="font-family: Tahoma; font-size: 11px; font-weight:normal; color:gray; line-height:none;" >
                                                    </dx:ASPxLabel>
                                    

I want to add line after this label’s text like above but this is giving me parsing error.

hi

set label text from code behind 

or using javascript

<asp:Label ID="lblReturn" runat="server" Text="ADD A RETURN <BR/>NEW LINE"></asp:Label>

That work for me.

EDIT: BETTER EXAMPLE TEXT

label1.Text = "I AM HERE" + '<br/>' + "I AM NOW HERE";

hello

use n for new line for lable text

   <dx:ASPxLabel ID="lbl1"  runat="server" Width="170px">
        </dx:ASPxLabel>
        lbl1.Text = "New line n this will in new line";

above code on code behind

SeeDosRun

<asp:Label ID="lblReturn" runat="server" Text="ADD A RETURN <BR/>NEW LINE"></asp:Label>

That work for me.

EDIT: BETTER EXAMPLE TEXT

Not working for me it is giving me the output.

Group
Type cannot be modified as it is being used by some <BR/> procedure instances.
 

Set 

EncodeHtml="False"

<dx:ASPxLabel 
ID="lblGuidingText" ClientInstanceName="lblGuidingText" runat="server"
Text="Group Type cannot be modified as it is being used by some procedure instances.
" +"<br />" Visible="false" ToolTip="" ViewStateMode="Disabled" Style="font-family: Tahoma; font-size: 11px; font-weight:normal; color:gray; line-height:none;"
EncodeHtml="False">
</dx:ASPxLabel>

Leave a Reply