The exception is caused by the
SubString
.
i.e:
string id = Page.Request.Form["__EVENTTARGET"].Substring(0, Page.Request.Form["__EVENTTARGET"].IndexOf(":"));
According to MSDN:
Exception
ArgumentOutOfRangeException
Condition
startIndex plus length indicates a position not within this instance.
-or-
startIndex or length is less than zero.
Read some more
here[
^]