日期:2014-05-17 浏览次数:20422 次
<%# Eval("field").ToString().Length>20?Eval("field").ToString().SubString(0,20)+"...":Eval("field").ToString() %>
------解决方案--------------------
<form id="form1" runat="server"> <div> <asp:Repeater ID="rptList" runat="server" onitemdatabound="rptList_ItemDataBound"> <ItemTemplate> <div><asp:Label ID="lblMessage" runat="server" Text='<%#Eval("Message") %>'></asp:Label></div> </ItemTemplate> </asp:Repeater> </div> </form>