如何在不同的行中显示问题以进行在线考试项目。 [英] How to display questions in different lines for doing online exam project.

查看:94
本文介绍了如何在不同的行中显示问题以进行在线考试项目。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从数据库表中检索问题。

如果用户选择C#考试,C#代码将在那里。



Eg :

I am retrieving the questions from database table.
If user is selecting C# examination, C# codes will be there.

Eg:

Which of the following are the correct ways to increment the value of variable a by 1?

1.++a++;
2.a += 1;
3.a ++ 1;
4. a = a +1;
5.a = +1;



-------------------------------- ---------------------




-----------------------------------------------------

A.  1, 3
B.  2, 4
C.  3, 5
D.  4, 5





//选项还可以。我使用RadioButton。



但是用于打印这样的问题的控件是什么?

请建议一个解决方案。



//options are Ok. I use RadioButton.

But which control used to print the question like this?
Pls suggest a solution.

推荐答案

<table>

<!--start your loop here through the result set-->
 <tr>
    <td>your question</td>
 </tr>
 <tr>
    <td><input type="radio" name="q1_a1" value="1">Maleyour answer 1</td>
 </tr>
<tr>
    <td><input type="radio" name="q1_a2" value="1">Maleyour answer 2</td>
 </tr>
<tr>
    <td><input type="radio" name="q1_a3" value="1">Maleyour answer 3</td>
 </tr>
<tr>
    <td><input type="radio" name="q1_a4" value="1">Maleyour answer 4</td>
 </tr>
  <!--end your loop-->
</table>





您可以根据需要设计表格



you can design your table as you want


为什么需要控件?为什么你不能使用html表来显示问题和答案
why you need a control? why can't you use html table to display the question and answers


这篇关于如何在不同的行中显示问题以进行在线考试项目。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆