wsyeager Posted November 8, 2005 Posted November 8, 2005 (edited) 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: (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: <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: 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.... Edited November 9, 2005 by PlausiblyDamp Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
wsyeager Posted November 9, 2005 Author Posted November 9, 2005 StyleSheet form question In other words, how can I reference the form names from my code-behind in place of Request.Form(arrLineDetail(3)) I know this will need to be Javascript form items that I will need to reference from my code-behind, b ut I don't know the proper syntax. Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
Administrators PlausiblyDamp Posted November 9, 2005 Administrators Posted November 9, 2005 Is the HTML sampe above the output sent to the browser or the server side mark up? If you are using ASP.Net then you could use the web controls and not need to mess aroun with the Request.Form stuff at all. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
wsyeager Posted November 9, 2005 Author Posted November 9, 2005 Stylesheet form problem Is the HTML sampe above the output sent to the browser or the server side mark up? If you are using ASP.Net then you could use the web controls and not need to mess aroun with the Request.Form stuff at all. It's sent to the browser via the "View Source" from Intgernet Explorer. It's too deep already to change everything else around. I have to use the stylesheets. Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
Administrators PlausiblyDamp Posted November 9, 2005 Administrators Posted November 9, 2005 Using the ASP.Net model doesn't prevent you from using stylesheets in any way whatsoever - it just seems an odd move to use ASP.Net 2 to mimic the ASP way of doing things... Could you attach the aspx page and the code behind (or if not the actual file a sample that exhibits the same problem)? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
wsyeager Posted November 9, 2005 Author Posted November 9, 2005 Attached, you will find the neccessary files for the problem. The code in question is inside the "GetAssessmentText" function on line 282 within the exam.aspx.vb file. If you need any further info, please feel free to let me know.PlacementTests.zip Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
wsyeager Posted November 9, 2005 Author Posted November 9, 2005 Actually, it's line 302..... Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.