wsyeager
Centurion
I took over doing another webform in ASP.Net 2.0 from a fellow co-worker, and have the following setup:
I have 20 StyleSheet questions as presented in the following format:
1) Evaluate the variable expression x + y - z when: x = 783, y = 472, z = 322
A) 11
B) 633
C) 933
D) 1577
E) Unsure how to solve
Corresponding form names to the above code:
Corresponding HTML for the above:
The previous developer had the following code which never worked to try and find a value that the user put in for the question:
When debugging, this value (Request.Form(arrLineDetail(3)) ) is set to NOTHING. For each question, the developer had cycled thru trying to get the answers the user put in.
How can I retrieve the values from the form? I know what arrLineDetail means, so don't worrry about that. Don't forget, this stylesheet is not within a form tag....
I have 20 StyleSheet questions as presented in the following format:
1) Evaluate the variable expression x + y - z when: x = 783, y = 472, z = 322
A) 11
B) 633
C) 933
D) 1577
E) Unsure how to solve
Corresponding form names to the above code:
Code:
(document.EXAM.Q1[0].checked)
(document.EXAM.Q1[1].checked)
(document.EXAM.Q1[2].checked)
(document.EXAM.Q1[3].checked)
(document.EXAM.Q1[4].checked
Corresponding HTML for the above:
Code:
<span class="questionText">1) Evaluate the variable expression x + y - z when: x = 783, y = 472, z = 322</span>
<br />
<input type="radio" name="Q1" value="A">
<span class="questionText">A) 11</span>
</input>
<br />
<input type="radio" name="Q1" value="B">
<span class="questionText">B) 633</span>
</input>
<br />
<input type="radio" name="Q1" value="C">
<span class="questionText">C) 933</span>
</input>
<br />
<input type="radio" name="Q1" value="D">
<span class="questionText">D) 1577</span>
</input>
<br />
<input type="radio" name="Q1" value="E">
<span class="questionText">E) Unsure how to solve</span>
</input>
The previous developer had the following code which never worked to try and find a value that the user put in for the question:
Code:
strQuery = "/*/section[@name='" & arrLineDetail(0) & "']/question[@label='" & arrLineDetail(1) & "']/option[@value='" & Request.Form(arrLineDetail(3)) & "']"
When debugging, this value (Request.Form(arrLineDetail(3)) ) is set to NOTHING. For each question, the developer had cycled thru trying to get the answers the user put in.
How can I retrieve the values from the form? I know what arrLineDetail means, so don't worrry about that. Don't forget, this stylesheet is not within a form tag....
Last edited by a moderator: