How to make a text wrap in ASP.net <StaticItemTemplate> Button

I want to make interactive menu with <StaticItemTemplate> Buttons. I use a local resources files for dynamically text loading. Is it possible to break text and place it in two lines on a button?

I tryed "<br/> \n etc. But didn't work

 <StaticItemTemplate>
    <asp:Button ID="button1" runat="server" Text='<%# Eval("Text") %>'  Width="117px" Height="59px"
           BorderStyle="None" ForeColor="Black" BackColor="Transparent"   
                        OnCommand="button1_onCommand"  
           CommandName='<%# Eval("Value") %>' meta:resourcekey="button1Resource1" />
      
   </StaticItemTemplate>

Open in new window


Please help me.
Leo01010101Asked:
Who is Participating?
 
Leo01010101Connect With a Mentor Author Commented:
I find a simple solution to place CR sign into the local resource text. I edit text under external editor allowing to place ENTER key hit. I copy it and paste into resource code.
It works properly now in many language switching.

0
 
slightwv (䄆 Netminder) Commented:
Try this trick.  I've not used it but it makes sense:  http://forums.asp.net/t/1161890.aspx/1
0
 
Leo01010101Author Commented:
Adding "\n" to local resource text didn't work
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
slightwv (䄆 Netminder) Commented:
What about the chr(13) noted below that one where it was stated it worked?
0
 
Leo01010101Author Commented:
also "\r" in text didn't help. What should be added to local resource text to allow breaking a line?
0
 
slightwv (䄆 Netminder) Commented:
"\r" isn't chr(13).

>>What should be added to local resource text to allow breaking a line?

I'm not sure.  I'll see if I can get some time to experiment and provide some working code.
0
 
slightwv (䄆 Netminder) Commented:
OK but that should be the same as the code in the link above:

Button1.Text = "Button" + chr(13) + "Text"
0
 
Leo01010101Author Commented:
Yes, but this code is not possible to place in  a local resource table as a text ( for many languages ).
0
 
slightwv (䄆 Netminder) Commented:
Cool.

Feel free to accept your post http:#a37033858 as the solution.
0
 
Amandeep Singh BhullarCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.