Link to home
Start Free TrialLog in
Avatar of Ramana99
Ramana99

asked on

Using wrap for ASP.net Label control?

hello
I am working on an ASP web application and have one ascx page where I display data(which actually reads from database) in an asp.net label control which actually resides in a html table in a row which is shown in code as below:
<TABLE id="Table8" cellSpacing="0" cellPadding="0" width="670" border="0">
<TR class="PRegularText" vAlign="top">
<TD class="PRegularText" style="WIDTH: 19px" height="23">&nbsp;</TD>
<TD class="PRegularText" height="23"><asp:label id="lblSourceofRevenue" runat="server" CssClass="PRegularText"></asp:label></TD>
</TR>
</Table>

Now I am getting an issue that there is large text for that label the entire page display is going too far to the right making the page disaligned and errors while printing.I do want the text in that label to be wrap to next line.
If you can open the URL http://www.ecb.ohio.gov/Public/ShowAgenda.aspx and click on AGR230 REquest you will se compared to other requests.
The strange thing is when displaying a question which is the normal text its automatically wrapped which is below:
<TR class="PRegularText" vAlign="top">
<TD class="PRegularText" style="WIDTH: 19px">2.</TD>
<TD class="PRegularText">If applicable, explain why creating and/or increasing a
new fund and/or line item is more appropriate than depositing the revenue into
an existing fund and increasing the appropriation authority of an existing line
item.
</TD>
</TR>

Please help me with this so that my page is properly aligned with a fixed width and data in the label controls not crossing the margins? I used wrap="true" and set width="100" and other smallest possible length both in label control and also in TD and TR but of no use?
Avatar of Kelmen
Kelmen

try STYLE="word-wrap:break-word;"
ASKER CERTIFIED SOLUTION
Avatar of Rejojohny
Rejojohny
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial