Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am retrieving the questions from database table.
If user is selecting C# examination, C# codes will be there.

Eg:
CSS
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;

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

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


//options are Ok. I use RadioButton.

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

HTML
<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
 
Share this answer
 
v3
why you need a control? why can't you use html table to display the question and answers
 
Share this answer
 
Comments
KALYANI BIBIN 9-May-14 1:53am    
but if i have to print a question like
class A
{
Main()
{
xxxx;
xxxxxx;
}
}

How it will perform?
Thanks7872 9-May-14 1:56am    
This is not a solution to the problem. Remove this and post it as comment to question.
Thilina Chandima 9-May-14 2:01am    
sorry mistake
Thilina Chandima 9-May-14 2:01am    
sorry mistake
KALYANI BIBIN 9-May-14 2:06am    
Can I Use a textBox for this ??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900