I have a list box on my site which has a specific width. The problem is that sometimes the text is too large and is cut off of the list. What I am hoping is to insert a new line on every entry in the list box (every ) so that it automatically becomes a new line.
Is it possible?
The list Box (Notice the text being cropped)
Code
<asp:ListBox ID="lstLegalEntity" runat="server" SelectionMode="Multiple" CssClass="client-bg-repeat" ForeColor="#000060" AutoPostBack="True">
<asp:ListItem>Select One Two Three Four Five Six Seven Eight</asp:ListItem>
<asp:ListItem>Select One Two Three Four Five Six Seven Eight</asp:ListItem>
<asp:ListItem>Select One Two Three Four Five Six Seven Eight</asp:ListItem>
<asp:ListItem>Select One Two Three Four Five Six Seven Eight</asp:ListItem>
</asp:ListBox>
What I am hoping is that I can put in every List Item's text into a function which inserts a "Line Break" after every 7 characters so that no entry is cut off and every long entry is shown in two lines.
Thanks.
with- .
– DOK Sep 30 '13 at 00:00