I'm working a comment section page where it allows the user to leave a comment. I need assistance in my layout for displaying the comments into the repeater control. I used to put the comments inside the div element of the item and alternatingitem template of the repeater. And as a result, the comment would go straight along the line in the div element if the user is typing too many words or paragraph. What I want is to put a limit where the text will stop and proceed to the next line of the div element. How would I do that?What is the best way?Any suggestion? Here's my layout for the repeater control where I used to insert the comments.
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td >
<div style="background-color:#FFFF66" >
<%# Eval("Name") %> Says...
<%# Eval("Comments") %>
</div>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td >
<div style="background-color:#CCFF33" >
<%# Eval("Name")%> Says...
<%# Eval("Comments")%>
</div>
</td>
</tr>
</AlternatingItemTemplate>
<SeparatorTemplate >
<br />
</SeparatorTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
tag after X-amount of words. If you would like an example, just ask here – Riaan Walters Mar 24 '13 at 19:09