Hello All!
I have a form which consists of questions and answers(radio buttons). I need to get all the radio buttons selected on the form upon pressing the Submit button.
This is my code for this and I seem to be getting this error:
Dim tmp As String = ""
Dim questID As String = ""
Dim ansID As String = ""
For i = 0 To Request.Form.Count
Select Case tmp = Request.Form.Get(i).ToString.Trim 'tmp
Case tmp.Substring(0, 5).ToString.Trim = "rdoTF"
rdotf = Split(Request.Form.GetValues(i).ToString.Trim, "~")
questID = rdotf(1)
ansID = rdotf(2)
Error: Index and length must refer to a location within the string. Parameter name: length
Can you tell me what I am doing wrong?
Thanks for your help!
I have a form which consists of questions and answers(radio buttons). I need to get all the radio buttons selected on the form upon pressing the Submit button.
This is my code for this and I seem to be getting this error:
Dim tmp As String = ""
Dim questID As String = ""
Dim ansID As String = ""
For i = 0 To Request.Form.Count
Select Case tmp = Request.Form.Get(i).ToString.Trim 'tmp
Case tmp.Substring(0, 5).ToString.Trim = "rdoTF"
rdotf = Split(Request.Form.GetValues(i).ToString.Trim, "~")
questID = rdotf(1)
ansID = rdotf(2)
Error: Index and length must refer to a location within the string. Parameter name: length
Can you tell me what I am doing wrong?
Thanks for your help!