System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string
The parameters for String.Substring
are:
public string Substring(int startIndex, int length)
You're trying to take 35 characters after the 26th character (startIndex is zero-based), which is out of range.
If you just want to get from the 25th character to the end of the string use text.SubString(24)
Second argument to string.Substring()
is the length, not the end-offset:
Response.Write(text.Substring(25, 10));