Truncate a databound string at runtime

So here is the scenario, I want to display the first 25 characters of a text field in a grid. You can do this a few ways such as, truncate when the datasource selects it, alter it on rowdatabound and probably a few others. But I wanted to try to find a way using the a format string. <asp:Label ID="amanotesLabel" runat="server" Text='<%#String.Format("{0}",Eval("notes")).Substring(0,25)%>' it...

December 30th, 2009 by B.Harding