Click here to Skip to main content
15,877,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
I am new to asp.net....I am trying to develop an online exam practice website for entrance exam in asp.net with c#. I am done with the database design, login page, registration page and admin's operation such as insert, update and delete records through gridview. Now I want to develop main exam page in which user select the exam from the dropdown list and will be directed to that exam page and after giving exam result will be displayed.

I don't know to select  random questions with answer options from database and display them on the exam page...and all the exam related information should display on the result page...

Please provide me some sample code so that I should get some Idea how to implement whatever I have thought .

Here is my table design:

1) Exam Table         2) Question Table       3) Result Table
    Id			QId		RId
    ExamName		Section		ExamName
    No.OfQues		OptionA		No.OfCorrectAns
    TotalMarks		OptionB		No.OfWrongAns
     TotalTime		OptionC		MarksObtained
    ExamDate 		OptionD		No.OfAttemptQues
    QId			CorrectAns	No.OfSkipQues


What I have tried:

this code is not working :

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EXAM.aspx.cs" Inherits="EXAM" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">







Enter UserName:
<asp:TextBox ID="TextBox1" runat="server">



<asp:PlaceHolder ID="PlaceHolder1" runat="server">



<asp:Label ID="Label1" runat="server" Text="Label">



<asp:RadioButtonList ID="RadioButtonList1" runat="server">


<asp:Label ID="Label2" runat="server">



<asp:RadioButtonList ID="RadioButtonList2" runat="server">



<asp:Button ID="Button1" runat="server"
onclick="Button1_Click" Text="Sunmit" />
 
<asp:Button ID="Button2" runat="server" onclick="Button2_Click"
Text="Results" />




 







</form>
</body>
</html>
Posted
Updated 14-Mar-16 2:52am

1 solution

There are many, many ways you can display questions to the user. You really need to decide on a design and then do it.
 
Share this answer
 
Comments
Member 12170781 14-Mar-16 9:45am    
I have decided To display exam questions using datalist tool .I am having problem in generating result page which contain exam name,number of correct answers and wrong answers, total marks obtained, number of attempted and skip questions. I don't know how to calculate all this and display result. please help
ZurdoDev 14-Mar-16 9:51am    
Where are you stuck?

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