前台
<asp:TemplateColumn HeaderText="绑定网址">
            <HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
            <ItemTemplate>
             <FONT face="宋体">
              <asp:HyperLink id="HyperLink1" runat="server" Target=_blank text='<%# PartSubString(DataBinder.Eval(Container.DataItem,"url").ToString())%>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem,"url")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem,"url")%>'>
              </asp:HyperLink></FONT>
            </ItemTemplate>
            <FooterStyle HorizontalAlign="Center"></FooterStyle>
           </asp:TemplateColumn>
后台.cs
protected string PartSubString(string s)
  {
   if(s.Length>15)
   {
    return s.Substring(0,15)+"..."; 
   }
   return s;
  }