Project Report On Online Test: Department of Computer Science Engg
Project Report On Online Test: Department of Computer Science Engg
Project Report On Online Test: Department of Computer Science Engg
Department of Computer Science Engineering Lovely Professional University Phagwara (Distt. Kapurthala) Punjab India 144001
Ref:__________
Dated: __________
Certificate
Certified that this project entitled Online Test submitted by Nitin Gupta (RK18E1A21), students of Computer Science Engineering Department, Lovely Professional University, Phagwara Punjab in the partial fulfillment of the requirement for the award of Bachelors of Technology (Computer Science Engineering) Degree of LPU, is a record of students own study carried under my supervision & guidance. This report has not been submitted to any other university or institution for the award of any degree.
Acknowledgement
Apart from the efforts of me, the success of any project depends largely on the encouragement and guidelines of many others. I take this opportunity to express my gratitude to the people who have been instrumental in the this project. I would like to show my greatest appreciation to MR. Tajindar Sir. I cant say thank you enough for his tremendous support and help. I feel motivated and encouraged every time I attend his meeting. Without his encouragement and guidance this project would not have materialized.
The guidance and support received from all the members who contributed and who are contributing to this project, was vital for the success of the project. I am grateful for their constant support and help.
Abstract
The use of computer has been steadily increasing in science and technology since its invention. Computer Technology has spread its root in various areas including Industry, Science, Technology, Education and Business. Their application is increasing day by day in various other fields and their most recent conquest is Online Applications.
The online test system can be used by the students to take tests for various subjects. The questions have been designed to be objective/multiple.
The user has to register for the test. The Administrator provides a unique user name and password to the student. The user name and password will be required by the student for taking the test. At the end of the test the student can see his Result.
The tools and techniques that we are using are .NET and database SQL server 2008 for implementation. We chose .NET because of its speed and code reliability. Moreover, its high performance and multi language support. Also, database SQL server helps in retrieving data that is stored in its database so, the questions will be stored in database using SQL server.
TABLE OF CONTENTS 1. INTRODUCTION .............................................................................................................. 6-8 1.1 Purpose ..............................................................................................................................7 1.2 Scope ..................................................................................................................................8 Technology and Tool for Implementation ...................................................................... 7-15 2.1 Microsoft Visual Studio....................................................................................................9 2.2 .NET Features .................................................................................................................10 2.2.1 Easy Programming Model ...................................................................................10 2.2.2 Flexible Language Options ...................................................................................10 2.2.3 Great Tool Support................................................................................................10 2.2.4 Compiled execution ...............................................................................................10 2.2.5 Web-Farm Session State .......................................................................................11 2.2.6 Enhanced Reliability .............................................................................................11 2.2.7 Memory Leak, Deadlock and Crash Protection..................................................11 2.2.8 Easy Deployment ....................................................................................................11 2.2.9 Mobile Web Device Support .................................................................................11 2.3 How a .NET File Is Compiled ........................................................................................12 2.4 Asp. Net (Active Server Pages) ......................................................................................13 2.5 ASP .NET file ..................................................................................................................13 2.6 Working of ASP .NET ....................................................................................................13
2.
3 Running Programs14-30 3.1 Open A pop-up Box Using JavaScript ....................................................................14 3.2 For Loop .............................................................................................................. 14-15 3.3 Asp.net Form Coding ......................................................................................... 15-30 3.3.1 .aspx file:- ................................................................................................ 15-27 3.3.2 .aspx.cs file:- ........................................................................................... 27-30 4. REFERENCES31
1 INTRODUCTION
Online test System is a web based application which is used for conduct the exam or test on desktop. To give an exam a user required an acceptable user name and password provided by the administrator, with the help of this user name and password user login to this application. After this user have option to start the test. So by the use of this online test system the overhead of Examiner is reduced because there is no need of checking test papers etc.
1.1 PURPOSE
The purpose of online test System is to take online test in an efficient Manner and no time wasting for checking the paper. The main objective of On-line test simulator is to efficiently evaluate the candidate thoroughly through a fully automated system that not only saves lot of time but also gives fast results. For students they give papers according to their convenience and time and there is no need of using extra thing like paper, pen etc.
Security is also major part of online test if the test is secure then it is easy to evaluate the capability of candidate. Security means users are not allowed to use their desktop/laptop application like Calculator, e-book, search engine etc. The purpose of this system is to provide much better security then other system present till date.
System must be User friendly means that there are no such components which are not understandable, so that user can easily interact with system. Administrator has a privilege to create, modify and delete the test papers and its particular questions.
1.2 SCOPE
Online test system can be used in educational institutions as well as in corporate world. Like in education system online test are more helpful to conduct exam and calculate the result because all the work will be done in small amount of time. In corporate world aptitude test will be taken online then overhead of check test paper and time consumption is reduced.
Online test can be used anywhere any time as it is a web based application. So there no constraints that user must be present on examination hall so it is very helpful in distance learning or many more exams.
In online test there no restriction that examiner has to be present when the candidate takes the test. Because this test is highly secure so that user if user ever try to cheat then test will be submitted or say test will be ended.
10
11
Fig 2.3.1
12
ASP.NET Web Pages and the new Razor syntax provide a fast and lightweight way to combine server code with HTML to create dynamic web content. You can connect to databases, add video and graphics include social networking and add many more features using the latest web standards. ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server. ASP.NET file is a program that runs inside IIS (Internet Information Services) which is Microsoft's Internet server. IIS comes as a free component with Windows servers .it is also a part of Windows 2000 and XP Professional
13
3 Running Programs
3.1 Open A pop-up Box Using JavaScript
<html> <head> <script type="text/javascript"> function show_alert() { alert("Hello! Good Morning Sir !"); } </script> </head> <body>
</body> </html>
3.2 For Loop
<html> <body>
<p>Explanation:</p>
<p>As long as <b>i</b> is less than, or equal to 5, the loop will continue to run.</p>
15
</head> <body> <form id="form1" runat="server"> <div> <center> <font color="red" size="4px">*</font>Required fields<br /> <fieldset style="width:60%;"> <legend> Personal info </legend>
<tr> <td align="right" width="50%"> <asp:Label ID="lb_fname" runat="server" Text="First Name" Width="50%" Height="100%"></asp:Label><br />
</td> <td width="50%" align="left"> <asp:TextBox ID="txt_fname" runat="server" style="margin-bottom: 0px"></asp:TextBox> <asp:RequiredFieldValidator ID="r_fname" runat="server" ControlToValidate="txt_fname" ErrorMessage="*" ForeColor="#CC0000" ValidationGroup="valid" Display="Dynamic"></asp:RequiredFieldValidator> </td> </tr> <tr> <td align="right" width="50%"> <asp:Label ID="lb_lname" runat="server" Text="Last Name" Width="50%" Height="100%"></asp:Label><br />
17
<asp:RequiredFieldValidator ID="r_lname" runat="server" ControlToValidate="txt_lname" ErrorMessage="*" ForeColor="#CC0000" ValidationGroup="valid" Display="Dynamic"></asp:RequiredFieldValidator> </td> </tr> <tr> <td align="right" width="50%"> <asp:Label ID="lb_email" runat="server" Text="Email Id" Width="50%" Height="100%"></asp:Label><br />
</td> <td width="50%" align="left"> <asp:TextBox ID="txt_email" runat="server" ToolTip="example@example.com"></asp:TextBox> <asp:RequiredFieldValidator ID="r_email" runat="server" ControlToValidate="txt_email" Display="Dynamic" ErrorMessage="*" ForeColor="#CC0000" ValidationGroup="valid"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="r_invalid_email" runat="server" ControlToValidate="txt_email" ErrorMessage="Invalid Email ID" ForeColor="#CC0000"
18
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([.]\w+)*" ValidationGroup="valid" Display="Dynamic"></asp:RegularExpressionValidator> </td> </tr> <tr> <td align="right" width="50%"> <asp:Label ID="lb_sex" runat="server" Text="Sex" Width="50%" Height="100%"></asp:Label><br /> </td> <td width="50%" align="left">
<asp:RadioButton ID="RadioButton1" runat="server" Text="Male" GroupName="sex" /> <asp:RadioButton ID="RadioButton2" runat="server" Text="Female" GroupName="sex" />
</td>
</tr> <tr> <td align="right" width="50%"> <asp:Label ID="lb_dob" runat="server" Text="Date Of Birth">
19
</asp:TextBox>
<asp:RequiredFieldValidator ID="r_dob" runat="server" ControlToValidate="txt_dob" ErrorMessage="*" ForeColor="#CC0000" ValidationGroup="valid" Display="Dynamic"></asp:RequiredFieldValidator> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> </td> </tr> <tr> <td align="right" width="50%">
20
<asp:Label ID="lbl_password" runat="server" Text="Password"> </asp:Label> </td> <td align="left" width="50%"> <asp:TextBox ID="txt_password" runat="server" TextMode="Password" ToolTip="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="r_password" runat="server" ControlToValidate="txt_password" ErrorMessage="*" ForeColor="#CC0000" ValidationGroup="valid" Display="Dynamic"></asp:RequiredFieldValidator> </td> </tr> <tr> <td align="right" width="50%"> <asp:Label ID="lbl_cpassword" runat="server" Text="Confirm Password"> </asp:Label> </td> <td align="left" width="50%"> <asp:TextBox ID="txt_cpassword" runat="server" TextMode="Password" ToolTip="Confirm Password"></asp:TextBox>
21
<br /> <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txt_password" ControlToValidate="txt_cpassword" Display="Dynamic" ErrorMessage="Password Doesn't Match" ForeColor="#CC0000" ValidationGroup="valid"></asp:CompareValidator> </td> </tr> </table> </fieldset> <fieldset style="width:60%;"> <legend>Education Info </legend> <table cellpadding="5px" cellspacing="5px" width="100%" style="background-color:Silver;"> <tr> <td align="right" style="width:50%"> <asp:Label ID="lb_qualifiction" runat="server" Text="Qualification"></asp:Label> </td> <td width="50%" align="left"> <asp:DropDownList ID="dropdlist_qualification" runat="server" AppendDataBoundItems="True">
22
</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td width="50%" align="right"> <asp:Label ID="lb_Country" runat="server" Text="Country"></asp:Label> </td> <td width="50%" align="left"> <asp:DropDownList ID="dropdlist_country" runat="server" AppendDataBoundItems="True"> <asp:ListItem Value="0" Text="Select Country"> </asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td align="right" width="50%"> <asp:Label ID="lb_uniname" runat="server" Text="College/University"></asp:Label>
23
</td> <td width="50%" align="left"> <asp:DropDownList ID="dropdlist_uniname" runat="server" AppendDataBoundItems="True"> <asp:ListItem Selected="True" Value="0" Text="Select College"></asp:ListItem> </asp:DropDownList> </td> </tr> </table> </fieldset> <fieldset style="width:60%;"> <legend> Submit </legend> <table style="background-color:Silver" width="100%" cellpadding="6px" cellspacing="6px">
24
<asp:Button ID="btn_submit" runat="server" Text="Submit" /> </ContentTemplate> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"> <ProgressTemplate> <font color="red" size="4px">Records are submiting....</font> </ProgressTemplate> </asp:UpdateProgress> </center> </td> <td width="50%" height="30%"> <center> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <asp:Button ID="btn_cancel" runat="server" Text="Cancel" /> </ContentTemplate> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2"> <ProgressTemplate> <font color="red" size="4px">Records are Clearing....</font>
25
</ProgressTemplate> </asp:UpdateProgress> </center> </td>--%> <td width="50%" align="right"> <asp:Button ID="btn_submit" runat="server" Text="Submit" /> </td> <td width="50%" align="left"> <asp:Button ID="btn_cancel" runat="server" Text="Cancel" /> </td> </tr>
</table> </fieldset> <br /> <br /> <br /> <br /> </center> </div> </form> </body>
26
</html> 3.3.2 aspx.cs file using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration;
public partial class Default2 : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineTestDataConnec tion"].ConnectionString.ToString()); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Page.Validate(); BindCountry();
27
BindQualification(); BindUniversity(); } } protected void BindCountry() { SqlDataAdapter da = new SqlDataAdapter("select * from country", con); DataSet ds = new DataSet(); da.Fill(ds);
} protected void BindQualification() { SqlDataAdapter da = new SqlDataAdapter("select * from qualification", con); DataSet ds = new DataSet(); da.Fill(ds); dropdlist_qualification.DataTextField = "qualification";
28
dropdlist_qualification.DataValueField = "id"; dropdlist_qualification.DataSource = ds; dropdlist_qualification.DataBind(); } protected void BindUniversity() { SqlDataAdapter da = new SqlDataAdapter("select * from university", con); DataSet ds = new DataSet(); da.Fill(ds); dropdlist_uniname.DataTextField = "university"; dropdlist_uniname.DataValueField = "id"; dropdlist_uniname.DataSource = ds; dropdlist_uniname.DataBind(); } protected void btn_cancel_Click(object sender, EventArgs e) { txt_dob.Text = ""; txt_email.Text = ""; txt_fname.Text = ""; txt_lname.Text = ""; txt_password.Text = ""; txt_cpassword.Text = ""; RadioButton1.Checked = false;
29
} }
30
4. References
www.w3schools.com/html/html_intro.asp en.wikipedia.org/wiki/HTML msdn.microsoft.com/en-us/library/aa286483.aspx Pro ASP.NET 4.0 in C# 2008 ASP. NET 3.5 Enterprise Application Development with Visual Studio 2008 By-vince varallo lpu.lionsher.com gild.com indiabix.com
31