I have a repeater that displays data from my Projects table. There are projectId, name and description. I use Substring(1, 240) on description. But sometimes the string is s
string dec = "description"; string result = dec.Substring( 0, dec.Length > 240 ? 240 : dec.Length )