顯示15個字,多於15個字, 用...表示
<asp:TemplateField HeaderText="**介紹">
<ItemStyle HorizontalAlign="Left" />
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" DataTextField="Introduce" HeaderText="**介紹" Text=’<%# Convert.ToString(Eval("Introduce")).Length>15?Convert.ToString(Eval("Introduce")).Substring(0,15)+"...":Eval("Introduce") %>’ />
</ItemTemplate>
</asp:TemplateField>