Return to Snippet

Revision: 31557
at September 8, 2010 23:43 by housecor


Initial Code
int QuestionNumber = Convert.ToInt16(rbList.ID.ToString().Substring(rbList.ID.ToString().Length -1, 1)); //get the question number from the end of the control's ID.

Initial URL


Initial Description
Useful when you have multiple fields on a page that call the same method (ie via OnSelectedIndexChanged), since you can't pass a param as part of the call

Initial Title
Get the question number from the end of the calling control's ID

Initial Tags


Initial Language
C#