首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

想做一个考试系统,怎么判断选择题的对错

2012-01-19 
想做一个考试系统,如何判断选择题的对错系统题目是固定的,当点击一个BUTTON按纽,右边显示题目,有选择题,用

想做一个考试系统,如何判断选择题的对错
系统题目是固定的,当点击一个BUTTON按纽,右边显示题目,有选择题,用VS2005工具开发,C/S结果,请问,题目用什么控件来显示最好?选择题如何判断对错?请各位DX指点下迷津

[解决办法]
对于每道题的几个选项前各拖入一个RadioButton的控件,将控件的GroupName设置为相同的名字如rb
<tr>
<td style= "width: 464px ">
<span style= "font-size: 10pt "> </span>
<asp:RadioButton ID= "RadioButton1 " runat= "server " GroupName= "rb " /> <span style= "font-size: 10pt ">
选项1;&nbsp; </span> </td>
<td style= "width: 665px ">
<asp:RadioButton ID= "RadioButton2 " runat= "server "
GroupName= "rb " /> <span style= "font-size: 10pt "> </span> <span style= "font-size: 10pt ">
选项2, </span> </td>
</tr>
后台里面提交每道题的答案用this.RadioButton1.Checked;表示用户是否选择“选项1”,this.RadioButton2.Checked表示用户是否选择“选项2

热点排行