Get the Item Number of the Checked item of a CheckedBoxList

To get the item number of the item that was checked in a CheckBoxList for Visual Studio 2003 use the following:

int itemNumber = Convert.ToInt32(Request.Form[“__EVENTTARGET”]
                 .Substring(Request.Form[“__EVENTTARGET”].LastIndexOf(“:”) + 1));

Comments are closed.