As Simon says, you will encounter this error when a string is less than 30 characters.
You can write a protected method on your page -
protected string GetSubstring(string str, int length) { return str.Length > length ? str.Substring(0, length) : str; }
Call it from aspx code as follows:
Text='<%# String.Format("{0}", GetSubstring(Eval("Title").ToString(), 30) %>'
source share