• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8404
  • Last Modified:

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?
0
Ramana99
Asked:
Ramana99
1 Solution
 
KelmenCommented:
try STYLE="word-wrap:break-word;"
0
 
RejojohnyCommented:
cls u post the style for PRegularText

also the td in which u have the label .. the width is not specified .. unless its specified in the "style"

<TD class="PRegularText" width="200" height="23"><asp:label id="lblSourceofRevenue" runat="server" style="width:100%" CssClass="PRegularText"></asp:label></TD>
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now