cbittner
asked on
Conceptual brain picking (and once code question) - how might a true false quiz be built?
I am practicing some coding, and want to build a page that has a series of questions with the answer options of true or false using asp.net (my current job uses asp.net1.1 so I need to hone skills using that version) . The quiz is data built as an xml file. Currently I am building it as a series of nested repeaters to build the question (Question stem, then the true and false choices). The snag I am having is accessing a specific property of each answer (distractor) element (isCorrect), to store in an array as the correct choice, to later step thru for scoring. I am attaching my XML below, but what I guess I am looking for is first, what command could I use in the code behind to get the "isCorrect" property, and more importantly, from a high level, conceptual, point of view, is there a better way for me to be building this type of page?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, I am playing with the xslt approach, here is a question, how do I use server controls in an xslt template - it doesn't like the inclusion of the radioButton.
<xsl:template match="question" >
<tr bgcolor="#FFFFE0">
<td width="50%"><xsl:value-of select="stem"/></td>
<td width="25%" align="center"><asp:RadioB utton id="RadioButton1" runat="server"></asp:Radio Button><xs l:value-of select="distractor1" /> </td>
<td width="25%" align="center"><xsl:value- of select="distractor2" /></td>
</tr>
</xsl:template>
<xsl:template match="question" >
<tr bgcolor="#FFFFE0">
<td width="50%"><xsl:value-of select="stem"/></td>
<td width="25%" align="center"><asp:RadioB
<td width="25%" align="center"><xsl:value-
</tr>
</xsl:template>
ASKER
I am closing this because based on ethoths reply I am getting where I need to be.
ASKER
Actually after further review, I'm not thrilled with using xslt to build the question, adding server controls to the page is a nightmare.
ASKER