PROJECT REPORT
ON
GREEN EXAM
Submitted to
Rashtrasant Tukadoji Maharaj Nagpur University,
NAGPUR
In partial fulfillment of the requirement of
M.Sc. Final (Computer Science) Examination
Submitted by
Pritam S. Bhansali
Under the guidance of Under the co-guidance of
Prof. R. N. Jugele Mrs. S. S. Khandalkar
Associate Professor Lecturer
(Department of Computer Science) (Department of Computer Science)
DEPARTMENT OF COMPUTER SCIENCE
Shri Shivaji Education Society Amravati’s
SCIENCE COLLEGE
Congress Nagar, Nagpur-12.
2013-2014
DECLARATION
To,
The Principal
Shri Shivaji Science College,
Congress Nagar, Nagpur-440012
Respected Sir,
I the under signed, hereby declare that the project work entitled “GreenExam” submitted to
Rashtrasant Tukadoji Maharaj Nagpur University, Nagpur is our independent work.
This is my original work and has not been submitted anywhere for degree/diploma. The
system presented here is not been duplicated from any other source.
I understand that any such copying is liable to be punished in any way the University
authority may deem fit.
Thanking You.
Place: Nagpur Yours Sincerely
Date:
Mr. Pritam S. Bhansali
Department of Computer Science
Shri Shivaji Education Society Amravati’s
Science College, Congress Nagar, Nagpur-12
CERTIFICATE
This is to certify that Pritam S. Bhansali has successfully prepared the project report
entitled “GreenExam” under my supervision towards the partial fulfillment of the
requirement of M.Sc.-Final (Computer Science) Semester-IV Examination submitted to
Rashtrasant Tukadoji Maharaj Nagpur University, Nagpur during the academic year
2013-2014.
Place: Nagpur Project Guide
Date:
Prof. R. N. Jugele
Associate Professor
(Department of Computer Science)
ACKNOWLEDGEMENT
I wish to express my sincere thanks to many persons who helped us to develop the
project. I extend my thanks to respected Principal Dr. D. K. Burghate, Shivaji Science
College, Nagpur for providing the infrastructure and facilities without which it would have
been impossible to complete this hard task.
In this respect I thank to, Prof. S. R. Pande Head of Department of computer science
for his valuable guidance encouragement and supervision throughout this project.
My foremost thanks to Prof. R. N. Jugele, who has guided as in completing this
project report, I take the opportunity to express the deep sense of gratitude and whole thanks
for his inspiration and guidance throughout the course of this project.
I am thankful to my Co-Guide Lect. S. S. Khandalkar for her constant inspiration
and guidance throughout the course of this project work.
I express my gratitude to all members of teaching and non-teaching staff of the
Department of Computer Science for their co-operation during the verification of the project.
Finally I thanks to my friends and especially who helped us in my endeavours.
Place: Nagpur
Date: Mr. Pritam S. Bhansali
INDEX
Sr. No. Name Of Topics Page No.
1. INTRODUCTION
1.1 Background
1.2 Objectives
1.3 Proposed System
1.3.1 Purpose
1.3.2 Scope
1-4
2. SURVEY OF TECHNOLOGY 5
3. REQUIREMENTS AND ANALYSIS
3.1 Problem Definition
3.2 Planning and Scheduling
3.3 Software and Hardware Requirements
3.4 Feasibility Study
3.4.1 Economic
3.4.2 Technical
3.4.3 Operational
6-10
4. SYSTEM DESIGN
4.1 Program Flowchart
4.2 Basic Modules
4.3 Data Design
4.3.1 Data Design
4.3.2 Data Dictionary and Data Views
4.3.3 E-R diagram and DFDs
4.4 UML Diagram
4.4.1 Hierarchy Diagram
4.4.2 Use Case Diagram
4.4.3 Activity Diagram
4.4.4 Sequence Diagram
11-21
5. IMPLEMENTATION AND TESTING
5.1 Coding Details
5.2 Testing Approach
5.2.1 Unit Testing
5.2.2 Integrated Testing
5.2.3 System Testing
5.3 Implementation and Maintenance
22-76
6. CONCLUSION
6.1 Limitations of the System
6.2 Conclusion
6.3 Future Scope of the Project
77-78
7. BIBLIOGRAPHY 79
CHAPTER 1
INTRODUCTION
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 1
1. INTRODUCTION
In today’s world the advancement of technology and the use of
internet is rapidly increasing. The day by day there is a huge increment in the
number of users accessing the internet. In each and every department
whether it is banking, financing, shopping there is use of internet. Due to
increasing number of objective type of exam and requirement of fast result
this system is very beneficial.
The solution of this problem is to conduct objective type exam by
online with help of online examination system using internet connection.
In campus recruitment, government sector, private sector there are
number of exam conducted day by day, the people who gives the exam and
system who conduct the exam want fastest result and recruitment. So, we
have developed this system to provide this type of functionality. This system
also provide security to the user as well as administrator. This is very flexible
system for user, administrator and exam conductors.
1.1 Background
This system is used to conduct the exam on online. It has the
administration part which is used to insert the question, show the result of
examination, how many students have seated for the examination and so on.
All this things control by the administrator. There is also the part of
registration which is used by the users to enrol their name to site for the
examinations. The user also can see the result after the examination finished
which reduce their work.
The administrator can also set the paper for the examination for the
student. The administrator can control the operation such as editing,
controlling, and managing. While examination there is provision for the user
to do the question next if the user doesn’t want to attempt the question and
the program automatically make the changes into the database. This project
provides the flexibility to the user as well as the administrator. This project
also has flexibility to the programming as well as to the database.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 2
1.2 Objectives
• To design and develop the online quiz system.
• To allow admin to create questions.
• Questions can have multiple options, multiple answers or can be text
answers.
• To allow faculty to give additional time to user with respect to points
earn.
• To allow automatic grading which can be recorded per test.
• To minimize the consumption of natural resources like pen, pencils,
papers …etc.
• This ultimately saves cost and the natural resources like trees.
• This concept helps the students to know about their caliber and secured
score/marks immediately without waiting for several months.
• In addition to this the certificates are also rewarded immediately which
includes name of examinee, secured marks by examinee, etc.
• To make the grading and testing system more easy, accurate, reliable.
• Online examination is the platform where larger/bigger examinations can
get conducted without human resources. Once the system is built by the
web developers then it is intelligent enough to manipulate and conduct
the tests/examinations automatically.
• The intelligence level depends on the developers which are intended to
develop the system according to requirements gathered.
1.3 Proposed System
1.3.1 Purpose
This is the era of computer. So everyone required every things
quickly so we decides to quick exam like online exam, because on paper
exam or offline exam required more paper, time & money. So this is waste
for exam process. In on paper exam, lot of work should be done such as
sitting arrangement for all the examinee at one time. In on paper exam, a lot
of instructor or invigilator required. In this system, all the examinee have
same question paper so that examinee have chance to ask to his friends .In
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 3
this system, paper checking is also vast process which require more efforts
like more than one people checks the paper and then displays the result. In
this system, examinee waited long time for declaring results.
In recent years, the use of electronic online quiz systems has become
quite popular due to pressures of increasing class sizes, and the need for
more efficient methods of assessing distant students. This thing motivates us
to work with web based quiz system. We also have tried to eliminate the
problem with general web based quiz system and decide to create a web
based intelligent quiz system. In our thesis project, we have tried to develop
an “Online Intelligent Quiz System” which will be popular with both the
students and teachers.
In our proposed project, we design our project more user friendly. We
use online mechanism for exam conduction. Today’s era is very fast, so
everyone wants fast results of their work. In our proposed project, we avoid
the above problems that are in on paper or offline exam. In our project, we
avoid the problem of sitting arrangement by arranging computers and exam
should be conducted in different batches. In this system, one or more
invigilator required. In this system, all the examinee have different question
paper so the problem of mischiefs is avoided. In this system, paper checking
is not difficult task because it is checked by computer programs. It also
shows the printed results are shown immediately. Therefore the online exam
the best option to the objective type exam because it reduce the man power,
also every process is secure.
1.3.2 Scope
This can be used in educational institutions as well as in corporate
world as well as no restriction that examiner has to be present when the
candidate appears for the test.
This concept can also be used in the field of health care where the
patients can find the remedies for his health related problems just by
answering some questioners provided on the screen and at the last the list of
medicines, prescriptions, daily exercises, etc. will be generated as a result.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 4
In addition this concept can also be implemented in the corporate area
as the market research known as Market Basket Analysis or in other words,
for finding the patterns of purchasing of various kind of products by
customers when customers appears in the shopping mall he/she can easily
walk through 1 or 2 minutes of questioners like which product should he/she
liked to purchase more?, at what quantity?, at what price?, which another
product he/ she intent for free with previously purchased product?, etc. such
questions and answers can be generated with the help of online examination
systems.
CHAPTER 2
SURVEY OF TECHNOLOGY
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 5
2. SURVEY OF TECHNOLOGY
As we know that, examination is very important in student life. In
school life, students give lot of exams and also in college life students give
lot of tests, examinations. But all these things should be done on paper. A lot
of work is required for exam conduction of this type. As the student goes
from college also he should give the tests like, in training periods, in
companies like Infosys, Mahindra takes lot of tests taken by them.
Also, the usage of computer system is very fast & so it is therefore
understood by nearly all people who discovered that this machine can
perform a very vast variety of applications and can be easily used to enhance
their working capabilities. Nowadays, Internet is one of the best and largest
media to store and spread knowledge and information. In this 21st
century,
each and every person or near about 80% people are able to understand about
computer, internet and applications related to it like websites, software’s and
new different technologies related to it.
The two basic things, mainly have given us an idea to make a project
based on ‘Campus Recruitment Tests’. In this test, student’s first login for
that test and then user selects the sections according to their subjects or
interest. After that, questions are displayed on the page. Then user selects the
answer for this questions and the result will display later on.
Second is all test are time consuming .It takes lot of time for
conducting of exam. All exams are conducted for one or more days. The idea
of this project comes from online registration, online railway reservation,
online banking, etc. In that all user makes their work online.
So, we decided to develop project for Online Examination System. In
which, examinee can give test online. We take example from some
companies like Tech. Mahindra, Accenture, like corporate companies. These
companies don’t give the result immediately to examine. But in our project,
result should be displayed immediately. This idea comes from the
Maharashtra Government MS-CIT examination. In this, we get
immediately results after the finishing the exam.
CHAPTER 3
REQUIREMENTS AND ANALYSIS
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 6
3. REQUIREMENTS AND ANALYSIS
As the technology changes at such fast phase, every one try to cope up
upgrading the systems consistently in order to stay competitive. It makes
efficient use of the advance technology and has ambition to discover more.
3.1 Problem Definition
This is the era of computer. So everyone required every things
quickly so we decides to quick exam like online exam, because on paper
exam or offline exam required more paper, time & money. So this is waste
for exam process. In on paper exam, lot of work should be done such as
sitting arrangement for all the examinee at one time. In on paper exam, a lot
of instructor or invigilator required.
In this system, all the examinee have same question paper so that
examinee have chance to ask to his friends .In this system, paper checking is
also vast process which require more efforts like more than one people
checks the paper and then displays the result. In this system, examinee
waited long time for declaring results.
In our proposed project, we design our project more user friendly.
We use online mechanism for exam conduction. Today’s era is very fast, so
everyone wants fast results of their work. In our proposed project, we avoid
the above problems that are in on paper or offline exam. In our project, we
avoid the problem of sitting arrangement by arranging computers and exam
should be conducted in different batches. In this system, one or more
invigilator required.
In this system, all the examinee have different question paper so the
problem of mischiefs is avoided. In this system, paper checking is not
difficult task because it is checked by computer programs. It also shows the
printed results are shown immediately. Therefore the online exam the best
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 7
option to the objective type exam because it reduce the man power, also
every process is secure.
3.2 Planning and Scheduling
In this phase what ever website/Software we are making we have to
decide a road map for that particular S/W or website. This road map includes
the timing and scheduling for that particular product on which we have to
start the work. It includes Designning, Coding, Testing, Debugging, etc. all
these parameters are decided as follows.
1 Design of the processes 25 days.
2 Coding : 40 days.
3 Testing : 15 days.
4 Analysis of Bugs : 20 days.
3.3 Software and Hardware Requirements
The software and hardware requirements are as follows:
SOFTWARE REQUIREMENTS
Front End MS Visual Studio, Dream viewer, Eclipse, Net Beans,
etc.
Back End MS SQL Server, My SQL, Oracle.
Frame Work DotNet, PHP, etc.
OS Windows, Linux, Mac, etc.
3
HARDWARE REQUIREMENTS
Processor P4 to Intel Core, AMD, etc.
RAM Min512MB, Max. 2GB.
Hard disk Min 10 GB.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 8
3.4 Feasibility Study
Feasibility study is conducted to assist users in determining
whether or not to implement our project cost. In this the feasibility study is
based on extensive research on the various fields of proposed system. It is
analysis of possible alternative solutions to a problem and recommendations
on best alternatives.
Therefore we should check the system format for its feasibility.
The following feasibility criteria are considered for the project in order to
ensure that the project does not have the major obstacles. Ones the existing
system has been studied, it is the task of analyst to finalize the feasibility
report.
3.4.1 Economic Feasibility study
It is an evaluation of the development cost, weighted against the
benefit derived from the developed system. The existing resources are
efficient for developing the system and no extra hardware is required. Thus
the system is economically feasible.
System can be divided into development, Operating & Intangible
costs. Operating cost in computer based information system includes-
• Hardware/Software rental or description charge.
• The salary of the computer operator & other data processing who will
operate the new system.
• The salary of computer analyst & computer programmers who perform
the system maintenance function.
• The cost of maintaining the proper fiscal facilities including power, light,
heat, Air Condition, Building rental or other facility charges & equipment
& building maintenance charges.
It is very important to consider how cost varies over time. The rate of
investment is always an important factor for managements especially in
relation to the rate of return.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 9
Hardware used in this project is as follows:
Software used in this project is as follows:
Software Required Cost
Operating system(Any) Rs.4000-10000
ASP.NET (C#) Freeware (some
versions)
MS SQL 2008 Freeware (some
versions)
3.4.2 Technical Feasibility study
During this, we specified require equipment’s that is hardware &
software that can satisfy user requirement. It concern with time required for
the output, response time, processing speed & data transfer rate of the
project. Generally project configuration is more important than hardware
make. This part covers all the technical requirements of the system of the
courier.
Technical feasibility is centred on the existing computer system i.e.
H/W & S/W etc. The system requirements are required for the
implementation; the system can be fulfilled by the management.
Components Required Cost
Pentium IV processor (CPU) or above. Rs. 2500-3500
RAM (minimum 512 MB) Rs. 750-950
Hard Disk Space(1 GB) Rs. 1000-1500
Monitor Rs. 3000-4000
Keyboard/Mouse Rs. 200-300
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 10
The software which we are going to develop will be the most efficient and
user friendly. This project will provide the different functionality to user. It is
very useful for small as well as large organization.
Proposed system is simple and easy to understand and use. It can be
implemented with minimum cost requirements and with most basic hardware
available.
3.4.3 Operational Feasibility study
To solve the problems in Manual Quiz System they required a
computerized system to handle all the works. They required a web based
application that will provide a working environment that will be flexible and
will provide ease of work and will reduce the time for report generation and
other paper works.
• System contains the answer of the question to set in the database.
• When user is login then after there are some option to choose the test
question paper.
• After selecting the option the question randomly display on the screen.
• After solving all the question, the answer are being check it out
automatically.
• The result of this test is then store into student details.
• At last the result will display on the screen.
Components name Required configuration
Processor (CPU) Pentium IV
RAM minimum 512 MB
Hard Disk Space Minimum 1 GB
Monitor Any
Keyboard/Mouse Any
CHAPTER 4
SYSTEM DESIGN
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 11
4. SYSTEM DESIGN
4.1 Program Flowchart
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 12
4.2 Basic Modules
The basic modules in this project are as follows:
1. Home
In this module we have designed our home page which is the start
page of this website.
2. Online Exam
This module inludes the login form to start the examination for
particular user. But note that user should be previously registered.
3. New Registration
This module inludes the registration form for new users which are
wiling to appear for exams.In this module users have to fill up there
information on that basis they can choose their user name and password.
4. Results
This module inludes the the login form through which user can
view their results.
5. Admin Login
It includes the login form for admin.
6. About Us
It includes the information about our website.
4.3 Data Design
4.3.1 Data Design
Data sesign includes the relations that we have created in the database.
Which contains all the crucial data that we are using in our website this data
includes registration information, questions and answers, etc. Database
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 13
Design:
Table 1:
AdminLogin
Table 2:
QuetionMaster
Table 3:
Registration
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 14
Table 4:
Results
Table 5:
SubjectMater:
Data entered in the tables:
1) AdminLogin
2) QuetionMaster
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 15
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 16
3) Registration
4) Results:
Results Displayed according to subjects name, user name, obtained
marks and exam date:
Query:
“Select Results.Id as Id,Name,SubjectName,ObtainedMarks,ExamDate from
Results,SubjectMaster,Registration where
Results.SubjectId=SubjectMaster.Id and Results.UserId=Registration.Id;”
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 17
5) SubjectMaster
4.3.2 Data Dictionary
Data dictionary is the data structure which keep details of the contents of data
flows, processes, and data stores. It is a structured repository of data about data. It is of
rigorous definitions of all DFD data elements and data structures.
We have seen the DFD early they only provide some descriptive information in
different shapes with very least details. Therefore in such cases data dictionary is good
option to store the details about those descriptive DFD sysmols.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 18
4.3.3 E-R diagram and DFDs
E-R diagram
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 19
Data Flow Diagram:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 20
4.4 UML Diagram
4.4.1 Use Case Diagram
User
Admin
Registeration
Appear for exam
Add/Delete subjects
Add/Delete
View User Results
Login
Get the printout of
certificate
View/Delete Users
Login
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 21
4.4.3 Sequence Diagram
CHAPTER 5
IMPLEMENTATION AND TESTING
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 22
5. IMPLEMENTATION AND TESTING
5.1 Coding Details
Source Code:
AddQuestion.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
`<asp:ScriptManager runat="server" ID="scr" />
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px; margin-right: 23px;
Width="1025px" BackImageUrl="~/Images/HomBack.jpg">
<asp:HiddenField ID="HiddenField1" runat="server" />
<br />
<br />
<table border="0" width="1000px" cellpadding="0" cellspacing="0">
<tr>
<td align="right" width="333px" height="40px">
<asp:Label ID="Label2" runat="server" Text="*"
CssClass="style2"></asp:Label>
<b>&nbsp; Select Subject : </b>
</td>
<td align="left" width="533px" height="40px">
<asp:DropDownList ID="ddlSubject" runat="server" Width="200px"
class="dropDown">
<asp:ListItem Value="0">-- Select --</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="ddlSubject"
ErrorMessage="Required Field" Style="color: #FF0000"
ValidationGroup="A"
InitialValue="0">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator2_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator2">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr> <td align="right" width="333px"
height="40px">
<b> <asp:Label ID="Label3" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; Question : </b>
</td> <td align="left" width="533px" height="40px">
<asp:TextBox runat="server" ID="txtQuestion" Width="450px"
class="textbox" />
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 23
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server" ControlToValidate="txtQuestion"
ErrorMessage="Required Field" Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator3_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator3">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr> <td align="right" width="333px"
height="40px">
<b>
<asp:Label ID="Label4" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; Option 1 : </b>
</td>
<td align="left" width="533px" height="40px">
<asp:TextBox runat="server" ID="txtOption1" Width="350px"
class="textbox" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator4"
runat="server" ControlToValidate="txtOption1"
ErrorMessage="Required Field" Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator4_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator4">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>
<asp:Label ID="Label5" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; Option 2 : </b>
</td>
<td align="left" width="533px" height="40px">
<asp:TextBox runat="server" ID="txtOption2" Width="350px"
class="textbox" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator5"
runat="server" ControlToValidate="txtOption2"
ErrorMessage="Required Field" Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator5_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator5">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>&nbsp; Option 3 : </b> </td>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 24
<td align="left" width="533px" height="40px">
<asp:TextBox runat="server" ID="txtOption3" Width="350px"
class="textbox" />
</td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>&nbsp;Option 4 : </b>
</td>
<td align="left" width="533px" height="40px">
<asp:TextBox runat="server" ID="txtOption4" Width="350px"
class="textbox" />
</td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>
<asp:Label ID="Label7" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp;Answer : </b></td>
<td align="left" width="533px" height="40px">
<asp:DropDownList ID="ddlAnswer" runat="server" Width="200px"
class="dropDown">
<asp:ListItem Value="0">-- Select --</asp:ListItem>
<asp:ListItem Value="Option1">Option 1</asp:ListItem>
<asp:ListItem Value="Option2">Option 2</asp:ListItem>
<asp:ListItem Value="Option3">Option 3</asp:ListItem>
<asp:ListItem Value="Option4">Option 4</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6"
runat="server" ControlToValidate="ddlAnswer"
ErrorMessage="Required Field" InitialValue="0" Style="color:
#FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator6_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator6">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr>
<td align="right" width="333px" height="40px">
</td>
<td align="left" width="533px" height="40px">
<asp:Button ID="btnSave" runat="server" Text="Save"
Width="100px" OnClick="btnSave_Click"
ValidationGroup="A" class="myButton" />
&nbsp;
<asp:Button ID="btnClear" runat="server" Text="Clear"
Width="100px" OnClick="btnClear_Click"
class="myButton" />
</td> </tr> </table> <br /> <br />
<div align="center">
<asp:GridView ID="gridQuestions" runat="server"
AutoGenerateColumns="false" Width="100%">
<Columns>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 25
<asp:BoundField DataField="Id" HeaderText="Id" Visible="false" />
<asp:BoundField DataField="Subject" HeaderText="Subject" />
<asp:BoundField DataField="Question" HeaderText="Question" />
<asp:BoundField DataField="Option1" HeaderText="Option 1" />
<asp:BoundField DataField="Option2" HeaderText="Option 2" />
<asp:BoundField DataField="Option3" HeaderText="Option 3" />
<asp:BoundField DataField="Option4" HeaderText="Option 4" />
<asp:BoundField DataField="Answer" HeaderText="Answer" />
<asp:TemplateField HeaderText="Edit / Delete">
<ItemTemplate>
<asp:ImageButton ID="linkEdit"
CommandArgument='<%#Eval("Id") %>' runat="server"
ImageUrl="~/Images/pencil.gif" ToolTip="Edit" Height="20px"
Width="20px" OnClick="linkEdit_Click" />
|
<asp:ImageButton ID="linkDelete"
CommandArgument='<%#Eval("Id") %>' OnClientClick="return
confirm('Do you want to delete the record..?');"
runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete"
Height="20px"
Width="20px" Text="Edit" OnClick="linkDelete_Click" />
</ItemTemplate>
</asp:TemplateField></Columns> </asp:GridView> </div>
</asp:Panel> </asp:Content>
AddSubject.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager runat="server" ID="scr" />
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<br />
<asp:HiddenField ID="HiddenField1" runat="server" />
<br />
<table border="0" width="1000px" cellpadding="0" cellspacing="0">
<tr>
<td align="right" width="333px" height="40px">
<asp:Label ID="Label2" runat="server" Text="*"
CssClass="style2"></asp:Label>
<b>&nbsp;<span class="style4"> </span> </b>
<span class="style6"><strong>Subject </strong></span><b><span
class="style4">:</span>
</b>
</td>
<td align="center" height="40px" class="style3">
&nbsp;&nbsp;
<asp:TextBox runat="server" ID="txtSubject" Width="200px"
class="textbox" />
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 26
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtSubject"
ErrorMessage="Required FIeld" Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator1_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator1">
</asp:ValidatorCalloutExtender>
</td>
<td align="left" width="333px" height="40px">
&nbsp; </td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>&nbsp; <span class="style5">Description :</span> </b>
</td>
<td align="center" height="40px" class="style3">
<asp:TextBox runat="server" ID="txtDescription" Width="200px"
class="textbox" />
</td>
<td align="left" width="333px" height="40px">
</td> </tr> <tr>
<td align="right" width="333px" height="40px">
</td>
<td align="center" height="40px" class="style3">
<asp:Button ID="btnSave" runat="server" Text="Save"
Width="100px" OnClick="btnSave_Click"
ValidationGroup="A" CssClass="myButton" />
&nbsp;&nbsp;
<asp:Button ID="btnClear" runat="server" Text="Clear"
Width="100px" OnClick="btnClear_Click"
CssClass="myButton" />
</td> <td align="left" width="333px" height="40px"> </td>
</tr> </table> <br /> <br />
<div align="center">
<asp:GridView ID="gridSubjects" runat="server"
AutoGenerateColumns="false" Width="40%">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" Visible="false" />
<asp:BoundField DataField="SubjectName" HeaderText="Subject"
/>
<asp:BoundField DataField="Description" HeaderText="Description"
/>
<asp:TemplateField HeaderText="Edit / Delete">
<ItemTemplate>
<asp:ImageButton ID="linkEdit"
CommandArgument='<%#Eval("Id") %>' runat="server"
ImageUrl="~/Images/pencil.gif" ToolTip="Edit" Height="20px"
Width="20px" OnClick="linkEdit_Click" />
|
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 27
<asp:ImageButton ID="linkDelete"
CommandArgument='<%#Eval("Id") %>' OnClientClick="return
confirm('Do you want to delete the record..?');"
runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete"
Height="20px"
Width="20px" Text="Edit" OnClick="linkDelete_Click" />
</ItemTemplate>
</asp:TemplateField> </Columns> </asp:GridView> </div>
</asp:Panel> </asp:Content>
AdminHome.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div>
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<table width="100%">
<tr align="center">
<td class="auto-style4" align="center">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-
Size="Large" Text="Welcome Admin To Green Exam"
ForeColor="#666633"></asp:Label><br /> <br /> </td>
</tr><tr align="center"> <td align="center"> &nbsp;
</td> </tr></table> </asp:Panel> </div> </asp:Content>
AdminMaster.Master
<body style="width: 1170px; margin-left: 76px;">
<form id="form1" runat="server">
<div style="margin-left: 16px">
<table> <tr> <td class="style1"> <asp:Panel ID="Panel1"
runat="server" Height="100px" Style="margin-top: 8px"
Width="1132px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label
ID="Label1" runat="server" Text="Welcome Admin To Green Exam
" Font-Bold="False"
Font-Names="Script MT Bold" Font-Size="40pt"
ForeColor="#99CC00" Height="100px"
Width="958px" Style="margin-left: 18px"></asp:Label>
</asp:Panel> &nbsp; </td> </tr> <tr> <td
class="style1">
<asp:HyperLink ID="HyperLink1" runat="server"
BackColor="#669900" Font-Size="X-Large" ForeColor="White"
Height="35px" Width="122px" NavigateUrl="~/AdminHome.aspx"
Font-
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 28
Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home</asp:
HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink2" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="210px"
NavigateUrl="~/AddSubject.aspx"
Font-Underline="False">&nbsp;&nbsp;Add
Subject</asp:HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink5" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="271px"
NavigateUrl="~/AddQuestion.aspx"
Font-Overline="False">&nbsp;&nbsp;&nbsp;&nbsp;Add
Question</asp:HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink4" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="271px"
NavigateUrl="~/ExamResults.aspx"
Font-Overline="False">&nbsp;&nbsp;&nbsp;&nbsp;Exam
Results</asp:HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink3" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="164px"
NavigateUrl="~/ShowUserInfo.aspx"
Font-Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User
Info</asp:HyperLink>
<br /> <br /> </td> </tr> <tr> <td align="right">
<asp:LinkButton Text="Logout" ID="linkLogout" runat="server"
OnClick="linkLogout_Click" />
</td> </tr> </table> </div> <table> <tr> <td
class="auto-style3">
&nbsp; </td> <td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server"></asp:ContentPlaceHolder></td> <td class="auto-
style3"> &nbsp; </td> </tr> </table> </form> </body>
Certificate.aspx
<body> <form id="form1" runat="server"> <br />
<asp:HyperLink ID="HyperLink1" runat="server"
BackColor="#669900" Font-Size="X-Large" ForeColor="White"
Height="35px" Width="122px"
NavigateUrl="~/Home.aspx" Font-Underline="False"
style="margin-left:
21px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home</asp:HyperLink>
<div id="PrintOuter" style="vertical-align: middle;" align="center">
<br /> <br />
<asp:Panel ID="Panel1" runat="server" BorderColor="Yellow"
BorderStyle="Solid" BorderWidth="10px" Style="margin-left:
136px" Width="789px">
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 29
<br /> <table style="height: 607px; width: 740px; margin-
left: 23px" frame="void"> <tr> <td class="style4"
align="center">
<asp:Label ID="Label1" runat="server" Font-
Bold="True" Font-Italic="False" Font-Names="Elephant"
Font-Sze="50pt" Text="GreenExam.com"></asp:Label> </td>
</tr> <tr> <td class="style1" align="center">
<asp:Label ID="Label2" runat="server" Text="This is to Certify that"
Font-Bold="True" Font-Names="Batang" Font-Size="XX-
Large"></asp:Label> </td> </tr> <tr> <td
class="style2" align="center">
<asp:Label ID="lblUserName" runat="server" Font-Bold="True"
Font-Italic="False" Font-Names="AR DECODE" Font-Size="XX-
Large"></asp:Label>
</td> </tr> <tr> <td class="style3" align="center">
<asp:Label ID="Label4" runat="server" Text="has secured" Font-
Bold="True" Font-Names="Batang" Font-Size="XX-
Large"></asp:Label>
</td> </tr> <tr>
<td align="center"> <asp:Label ID="lblMarksObtained"
runat="server" Font-Size="XX-Large"></asp:Label>
&nbsp;&nbsp;<asp:Label ID="Label6" runat="server" Font-
Bold="True" Font-Names="Batang" Font-Size="XX-Large"
Text="marks"></asp:Label>
&nbsp;&nbsp;<asp:Label ID="Label7" runat="server" Font-
Bold="True" Font-Names="Batang" Font-Size="XX-Large"
Text="out of"></asp:Label>
&nbsp; <asp:Label ID="Label8" runat="server" Text="10" Font-
Size="XX-Large"></asp:Label>
</td> </tr> </table> </asp:Panel> <br /> </div> <div
align="center">
<asp:Button ID="btnPrint" runat="server" Text="Print"
OnClientClick="javascript:printPartOfPage('PrintOuter');"
Width="100px" CssClass="all_btn1" />
<br /> </div> </form> </body>
Exam.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<asp:ScriptManager runat="server" ID="src" />
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
<ContentTemplate> <div align="center">
<span class="style2"><strong>Welcome :</strong></span>
<asp:Label Text="" ID="lblUserName" runat="server" Style="font-
weight: 700; font-size: large" />
</div> <br /> <div>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 30
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr> <td align="left" width="50%">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label7"
runat="server" Text="Question No "></asp:Label>
&nbsp;<asp:Label ID="lblQno" runat="server" Text="" />
&nbsp;
<asp:Label ID="Label6" runat="server" Text="Of 10"></asp:Label>
</td>
<td align="right" width="50%">
<asp:Timer ID="Timer1" runat="server" Interval="500"
OnTick="Timer1_Tick">
</asp:Timer> <asp:Label ID="lblTimer" runat="server" Font-
Bold="True"></asp:Label> </td> </tr> </table> </div>
</ContentTemplate> </asp:UpdatePanel>
<br /> <div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr> <td width="20%" class="style3"> &nbsp;
</td> <td class="style3"> <asp:Label ID="lblQuestion"
runat="server" Text="" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="radOptions"
ErrorMessage="Select your option." Style="color: #FF0000"
ValidationGroup="A">Select your
option.</asp:RequiredFieldValidator>
</td> <td class="style3" width="20%"> &nbsp; </td>
</tr> <tr> <td width="20%"> &nbsp; </td> <td>
<asp:RadioButtonList ID="radOptions" runat="server">
</asp:RadioButtonList>
</td> <td width="20%"> &nbsp; </td> </tr> </table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr> <td width="33.33%"> </td> <td width="33.33%">
<asp:Button ID="btnSubmit" runat="server"
OnClick="btnSubmit_Click" Text="Submit"Width="116px"
CssClass="myButton" ValidationGroup="A" />&nbsp;&nbsp;
<asp:Button ID="btnSkip" runat="server" ext="Skip" Width="100px"
OnClick="btnSkip_Click" CssClass="myButton" /> </td> <td
width="33.33%">&nbsp; </td> </tr> </table> </div> <br />
<br /> </asp:Panel> </asp:Content>
ExamResults.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <br />
<br /><div align="center"> <asp:GridView ID="gridUser"
runat="server" AutoGenerateColumns="false" Width="100%">
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 31
<Columns><asp:BoundField DataField="Id" HeaderText="Id"
Visible="false" /><asp:BoundField DataField="Name"
HeaderText="Name" /><asp:BoundField DataField="SubjectName"
HeaderText="Subject" /><asp:BoundField
DataField="ObtainedMarks" HeaderText="Obtained Marks" />
<asp:BoundField DataField="ExamDate" HeaderText="Exam Date"
/><asp:TemplateField HeaderText="Delete">
<ItemTemplate> <asp:ImageButton ID="linkDelete"
CommandArgument='<%#Eval("Id") %>' OnClientClick="return
confirm('Do you want to delete the record..?');" runat="server"
ImageUrl="~/Images/delete.jpg" ToolTip="Delete" Height="20px"
Width="20px" Text="Edit" OnClick="linkDelete_Click" />
</ItemTemplate> </asp:TemplateField>
</Columns> </asp:GridView> </div> </asp:Panel>
</asp:Content>
Home.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div><asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px" Width="927px" BackImageUrl=
"~/Images/HomBack.jpg"> <table width="100%">
<tralign="center"> <td class="auto-style4" align="center">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-
Size="Large" Text="How to apply :"
ForeColor="#666633"></asp:Label> <br /> <br />
<asp:Label ID="Label3" runat="server" Font-Size="X-Large"
Text="* For new registration click on 'New Registration'."
ForeColor="#666633"></asp:Label>
<br /> <br /> <asp:Label ID="Label4" runat="server" Font-
Size="X-Large" Text="* If you are old user then click on the 'Online
Exams' " ForeColor="#666633"> </asp:Label> <br />
<br /> <asp:Label ID="Label5" runat="server" Font-Size="X-Large"
Text="* To receive your scores click on 'Results'"
ForeColor="#666633"></asp:Label>
<br /> <br /> </td> </tr> <tr align="center"> <td
align="center"><asp:Image ID="Image1" runat="server"
Height="214px" ImageUrl="~/Images/SavePaperSaveEarth.jpg"
Style="margin-right: 8px; margin-top: 0px; margin-left: 61px;"
Width="651px" ImageAlign="Middle" /> </td> </tr>
</table> </asp:Panel> </div></asp:Content>
Instructions.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager runat="server" ID="scr" />
<div>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 32
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr> <td width="50%" align="Right"> <asp:Label ID="Label5"
runat="server" Font-Size="X-Large" Text="Select Subject :"
ForeColor="#666633"></asp:Label></td>
<td align="left" width="50%">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:DropDownList ID="ddlSubject" runat="server" Width="200px"
CssClass="dropDown"> <asp:ListItem Value="0">-- Select --
</asp:ListItem> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="ddlSubject"
ErrorMessage="Required Field" InitialValue="0" Style="color:
#FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator1_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator1">
</asp:ValidatorCalloutExtender> </td> </tr> </table>
<table width="100%"><tr align="center"> <td class="auto-
style4" align="center">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-
Size="Large" Text="Instructions" ForeColor="#666633">
</asp:Label><br /> <br />
<asp:Label ID="Label3" runat="server" Font-Size="X-Large"
Text="* 1 . Do Not Refresh / Reload the Page While Answering!"
ForeColor="#666633"></asp:Label>
<br /> <br />
<asp:Label ID="Label4" runat="server" Font-Size="X-Large"
Text="* 2 .Submit Each Questions after answering them!"
ForeColor="#666633"></asp:Label>
<br /> <br />
<asp:Label ID="Label6" runat="server" Font-Size="X-Large"
Text="* 2 .Do Not Press BackSpace While Answering.!"
ForeColor="#666633"></asp:Label>
<br /> <br /> </td> </tr>
<tr align="center"> <td align="center">
<asp:Label ID="Label1" runat="server" Font-Size="X-Large"
Text="All The Best..!"
ForeColor="#666633"></asp:Label>
</td>
</tr> <tr align="center">
<td align="center">
<asp:Button Text="Start Exam" ID="btnStartExam" runat="server"
OnClick="btnStartExam_Click"
ValidationGroup="A" CssClass="myButton" />
</td> </tr> </table> </asp:Panel> </div> </asp:Content>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 33
Login.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager runat="server" ID="scr" />
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<br /> <br />
<div align="center"> <table border="0" width="500px"
cellpadding="0" cellspacing="0">
<tr><td></td><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label7" runat="server" Font-Bold="True" Font-
Italic="False"
Font-Names="Script MT Bold" Font-Size="X-Large"
ForeColor="#336600"
Text="Admin Login"></asp:Label>
</td><td></td></tr> <tr>
<td align="right" width="333px" height="40px">
<asp:Label ID="Label2" runat="server" Text="*" Style="color:
#FF0000"></asp:Label>
<b>&nbsp; Username : </b>
</td> <td align="center" width="333px" height="40px">
<asp:TextBox runat="server" ID="txtUserName" Width="200px"
CssClass="textbox" />
</td>
<td align="left" width="333px" height="40px">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtUserName"
ErrorMessage="Required Field" ForeColor="Red"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator1_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator1">
</asp:ValidatorCalloutExtender></td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>
<asp:Label ID="Label3" runat="server" Text="*" Style="color:
#FF0000"></asp:Label>&nbsp; Password : </b></td>
<td align="center" width="333px" height="40px">
<asp:TextBox runat="server" ID="txtPassword" Width="200px"
CssClass="textbox"TextMode="Password" /></td>
<td align="left" width="333px" height="40px">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txtPassword"
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 34
ErrorMessage="Required Field" ForeColor="Red"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator2_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator2">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr><td align="right" width="333px" height="40px">
</td> <td align="center" width="333px" height="40px">
<asp:Button ID="btnLogin" runat="server" Text="Login"
Width="100px" OnClick="btnLogin_Click"
ValidationGroup="A" CssClass="myButton" />
&nbsp;&nbsp; <asp:Button ID="btnClear" runat="server"
Text="Clear" Width="100px" OnClick="btnClear_Click"
CssClass="myButton" /> </td> <td align="left" width="333px"
height="40px"> </td> </tr> </table> </div> <br /> <br
/></asp:Panel></asp:Content>
Master.Master
<%@ Master Language="C#" AutoEventWireup="true"
CodeBehind="Master.master.cs" Inherits="GreenExam.Master" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.auto-style3
{
width: 52px;
height: 76px;
}
.style1
{
width: 1140px;
}
</style>
</head>
<body style="width: 1170px; margin-left: 76px;">
<form id="form1" runat="server">
<div style="margin-left: 16px">
<table> <tr> <td class="style1">
<asp:Panel ID="Panel1" runat="server" Height="100px"
Style="margin-top: 8px" Width="1132px">
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 35
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;
<asp:Label ID="Label1" runat="server"
Text="&nbsp;&nbsp;Welcome To Green Exam " Font-Bold="False"
Font-Names="Script MT Bold" Font-Size="60pt"
ForeColor="#99CC00" Height="120px"
Width="958px" Style="margin-left: 18px"></asp:Label>
</asp:Panel> &nbsp; </td> </tr> <tr>
<td class="style1">
<asp:HyperLink ID="HyperLink1" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="122px"
NavigateUrl="~/Home.aspx" Font-
Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home</asp:
HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink2" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="210px"
NavigateUrl="~/OnlineExam.aspx"
Font-Underline="False">&nbsp;&nbsp;Online
Exams</asp:HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink5" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="271px"
NavigateUrl="~/NewRegistration.aspx"
Font-Overline="False">&nbsp;&nbsp;&nbsp;&nbsp;New
Registration</asp:HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink3" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="164px"
NavigateUrl="~/UserResults.aspx"
Font-
Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Results</asp:
HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink6" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="157px"
NavigateUrl="~/Login.aspx" Font-Underline="False">Admin
Login</asp:HyperLink>
&nbsp;<asp:HyperLink ID="HyperLink4" runat="server"
BackColor="#669900" Font-Size="X-Large"
ForeColor="White" Height="35px" Width="140px"
NavigateUrl="~/AboutUs.aspx" Font-
Underline="False">&nbsp;&nbsp;About Us</asp:HyperLink>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
<br /> <br /> </td> </tr> </table> </div> <table>
<tr>
<td class="uto-style3"> &nbsp; </td> <td>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 36
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</td> <td class="auto-style3">
&nbsp; </td> </tr> </table> </form> </body> </html>
NewRegistration.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager runat="server" ID="src" />
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<br /> <br /> <table border="0" width="1000px"
cellpadding="0" cellspacing="0">
<tr><td></td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;
<asp:Label ID="Label7" runat="server" Font-Bold="True" Font-
Italic="False" Font-Names="Script MT Bold" Font-Size="X-Large"
ForeColor="#336600"Text="Registration Form"></asp:Label>
<br /> </td> <td></td></tr> <tr> <td align="right"
width="333px" height="40px"> <asp:Label ID="Label2"
runat="server" Text="*" CssClass="style2"></asp:Label>
<b>&nbsp; Name : </b></td> <td align="center" width="333px"
height="40px">
<asp:TextBox runat="server" ID="txtName"
Width="200px" CssClass="textbox" /> <asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtName" ErrorMessage="Required Field"
Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator2_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator2">
</asp:ValidatorCalloutExtender>
</td> <td align="left" width="333px" height="40px">
</td> </tr> <tr> <td align="right" width="333px"
height="40px">
<b> <asp:Label ID="Label3" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; Email Id : </b>
</td> <td align="center" width="333px" height="40px">
&nbsp;&nbsp; <asp:TextBox runat="server" ID="txtEmailId"
Width="200px" CssClass="textbox" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server" ControlToValidate="txtEmailId"
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 37
ErrorMessage="Required Field" Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator3_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator3">
</asp:ValidatorCalloutExtender>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="txtEmailId" ErrorMessage="Email Id Not
Valid."
style="color: #FF0000" ValidationExpression="w+([-
+.']w+)*@w+([-.]w+)*.w+([-.]w+)*"
ValidationGroup="A">*</asp:RegularExpressionValidator>
<asp:ValidatorCalloutExtender
ID="RegularExpressionValidator1_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RegularExpressionValidator1">
</asp:ValidatorCalloutExtender> </td> <td align="left"
width="333px" height="40px"> </td> </tr> <tr> <td
align="right" width="333px" height="40px"> <b>
<asp:Label ID="Label4" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; Mobile No : </b> </td> <td align="center" width="333px"
height="40px"> &nbsp;&nbsp; <asp:TextBox
runat="server" ID="txtMobileNo" Width="200px"
CssClass="textbox" MaxLength="10" />
<asp:FilteredTextBoxExtender
ID="txtMobileNo_FilteredTextBoxExtender" runat="server"
Enabled="True" TargetControlID="txtMobileNo"
FilterType="Numbers" ValidChars="0123456789">
</asp:FilteredTextBoxExtender>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtMobileNo" ErrorMessage="Required Field"
Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator4_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator4">
</asp:ValidatorCalloutExtender> <asp:RegularExpressionValidator
ID="RegularExpressionValidator3" runat="server"
ControlToValidate="txtMobileNo"
ErrorMessage="Mobile No. not valid. Plesase enter 10 digits."
style="color: #FF0000" ValidationExpression="^[0-9]{10}$"
ValidationGroup="A">*</asp:RegularExpressionValidator>
<asp:ValidatorCalloutExtender
ID="RegularExpressionValidator3_ValidatorCalloutExtender"
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 38
runat="server" Enabled="True"
TargetControlID="RegularExpressionValidator3">
</asp:ValidatorCalloutExtender> </td> <td align="left"
width="333px" height="40px"> </td> </tr>
<tr> <td align="right" width="333px" height="40px"> <b>
<asp:Label ID="Label5" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; User Name : </b>
</td> <td align="center" width="333px" height="40px">
&nbsp;&nbsp;
<asp:TextBox runat="server" ID="txtUserName" Width="200px"
CssClass="textbox" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator5"
runat="server" ControlToValidate="txtUserName"
ErrorMessage="Required Field" Style="color: #FF0000"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator5_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator5">
</asp:ValidatorCalloutExtender>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4"
runat="server"
ControlToValidate="txtUserName"
ErrorMessage="Minimum 5 and maximum 10 charactors."
style="color: #FF0000"
ValidationExpression="^[sS]{5,10}$"
ValidationGroup="A">*</asp:RegularExpressionValidator>
<asp:ValidatorCalloutExtender
ID="RegularExpressionValidator4_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RegularExpressionValidator4">
</asp:ValidatorCalloutExtender>
</td>
<td align="left" width="333px" height="40px">
</td> </tr> <tr> <td align="right" width="333px"
height="40px"> <b>
<asp:Label ID="Label6" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp; Password : </b> </td>
<td align="center" width="333px" height="40px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox runat="server" ID="txtPassword" Width="200px"
CssClass="textbox"
TextMode="Password" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator6"
runat="server" ErrorMessage="Required Field"
Style="color: #FF0000" ValidationGroup="A"
ControlToValidate="txtPassword">*</asp:RequiredFieldValidator>
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 39
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator6_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator6">
</asp:ValidatorCalloutExtender>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtConfirmPassword"
ControlToValidate="txtPassword" ErrorMessage="Password don't
match" Style="color: #FF0000"
ValidationGroup="A">*</asp:CompareValidator>
<asp:ValidatorCalloutExtender
ID="CompareValidator1_ValidatorCalloutExtender" runat="server"
Enabled="True" TargetControlID="CompareValidator1">
</asp:ValidatorCalloutExtender>
<asp:RegularExpressionValidator ID="RegularExpressionValidator5"
runat="server"
ControlToValidate="txtPassword"
ErrorMessage="Minimum 5 and maximum 10 charactors."
style="color: #FF0000"
ValidationExpression="^[sS]{5,10}$"
ValidationGroup="A">*</asp:RegularExpressionValidator>
<asp:ValidatorCalloutExtender
ID="RegularExpressionValidator5_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RegularExpressionValidator5">
</asp:ValidatorCalloutExtender>
</td> <td align="left" width="333px" height="40px"> </td>
</tr> <tr>
<td align="right" width="333px" class="style3">
<b>
<asp:Label ID="Label1" runat="server" Text="*"
CssClass="style2"></asp:Label>
&nbsp;Confirm Password : </b>
</td>
<td align="center" width="333px" class="style3">
<asp:TextBox runat="server" ID="txtConfirmPassword"
Width="200px"CssClass="textbox" TextMode="Password" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator7"
runat="server" ErrorMessage="Required Field"
Style="color: #FF0000" ValidationGroup="A"
ControlToValidate="txtConfirmPassword">*</asp:RequiredFieldVali
dator><asp:ValidatorCalloutExtender
ID="RequiredFieldValidator7_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator7">
</asp:ValidatorCalloutExtender>
</td> <td align="left" width="333px" class="style3"> </td>
</tr> <tr> <td align="right" width="333px" height="40px">
</td> <td align="center" width="333px" height="40px">
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 40
<asp:Button ID="btnSave" runat="server" Text="Save"
Width="100px" OnClick="btnSave_Click"
ValidationGroup="A" CssClass="myButton" />
&nbsp;&nbsp; <asp:Button ID="btnClear" runat="server"
Text="Clear" Width="100px"
OnClick="btnClear_Click" CssClass="myButton" />
</td> <td align="left" width="333px" height="40px"> </td>
</tr> </table><br /> <br /></asp:Panel></asp:Content>
OnlineExam.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager runat="server" ID="scr" />
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
<br /> <br /> <div align="center">
<table border="0" width="500px" cellpadding="0" cellspacing="0">
<tr> <td align="right" width="333px" height="40px">
<asp:Label ID="Label2" runat="server" Text="*" Style="color:
#FF0000"></asp:Label> <b>&nbsp; Username : </b> </td>
<td align="center" width="333px" height="40px">
<asp:TextBox runat="server" ID="txtUserName" Width="200px"
CssClass="textbox" /></td> <td align="left" width="333px"
height="40px"> <asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtUserName"
ErrorMessage="Required Field" ForeColor="Red"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator1_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator1">
</asp:ValidatorCalloutExtender>
</td> </tr> <tr> <td align="right" width="333px"
height="40px"> <b>
<asp:Label ID="Label3" runat="server" Text="*" Style="color:
#FF0000"></asp:Label>&nbsp; Password : </b> </td>
<td align="center" width="333px" height="40px">
<asp:TextBox runat="server" ID="txtPassword" Width="200px"
CssClass="textbox"TextMode="Password" /> </td>
<td align="left" width="333px" height="40px">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txtPassword"
ErrorMessage="Required Field" ForeColor="Red"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator2_ValidatorCalloutExtender"
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 41
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator2">
</asp:ValidatorCalloutExtender></td> </tr> <tr> <td
align="right" width="333px" height="40px">
</td> <td align="center" width="333px" height="40px">
<asp:Button ID="btnLogin" runat="server" Text="Login"
Width="100px" OnClick="btnLogin_Click"
ValidationGroup="A" CssClass="myButton" />
&nbsp;&nbsp;
<asp:Button ID="btnClear" runat="server" Text="Clear"
Width="100px"
OnClick="btnClear_Click" CssClass="myButton" />
</td> <td align="left" width="333px" height="40px">
</td> </tr> </table> </div> <br /> <br /> </asp:Panel>
</asp:Content>
ShowUserInfo.aspx
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg"><br />
<br /><div align="center"><asp:GridView ID="gridUser"
runat="server" AutoGenerateColumns="False"
Width="100%"><Columns><asp:BoundField DataField="Id"
HeaderText="Id" Visible="false" /><asp:BoundField
DataField="Name" HeaderText="Name" /><asp:BoundField
DataField="MobileNo" HeaderText="Mobile No" />
<asp:BoundField DataField="EmilId" HeaderText="Email Id" />
<asp:BoundField DataField="UserName" HeaderText="UserName"
/><asp:BoundField DataField="Password" HeaderText="Password"
/><asp:TemplateField HeaderText="Delete">
<ItemTemplate><asp:ImageButton ID="linkDelete"
CommandArgument='<%#Eval("Id") %>' OnClientClick="return
confirm('Do you want to delete the record..?');"
runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete"
Height="20pxWidth="20px" Text="Edit" nClick="linkDelete_Click"
/></ItemTemplate> </asp:TemplateField> </Columns>
</asp:GridView></div> </asp:Panel> </asp:Content>
UserResult:
<asp:Content ID="Content2"
ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager runat="server" ID="scr" />
<asp:Panel ID="Panel2" runat="server" BackColor="#FFFF99"
Style="margin-left: 32px"
Width="927px" BackImageUrl="~/Images/HomBack.jpg">
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 42
<br /> <br /> <div align="center"><table border="0"
width="500px" cellpadding="0" cellspacing="0">
<tr><td></td><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label7" runat="server" Font-Bold="True" Font-
Italic="False"Font-Names="Script MT Bold" Font-Size="X-Large"
ForeColor="#336600"Text="Results"></asp:Label>
</td><td></td></tr> <tr> <td align="right" width="333px"
height="40px">
<asp:Label ID="Label2" runat="server" Text="*" Style="color:
#FF0000"></asp:Label><b>&nbsp; Username : </b> </td> <td
align="center" width="333px" height="40px">
<asp:TextBox runat="server" ID="txtUserName" Width="200px"
CssClass="textbox" />
</td> <td align="left" width="333px" height="40px">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtUserName"
ErrorMessage="Required Field" ForeColor="Red"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator1_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator1">
</asp:ValidatorCalloutExtender> </td> </tr> <tr>
<td align="right" width="333px" height="40px">
<b>
<asp:Label ID="Label3" runat="server" Text="*" Style="color:
#FF0000"></asp:Label> &nbsp; Password : </b>
</td>
<td align="center" width="333px" height="40px">
<asp:TextBox runat="server" ID="txtPassword" Width="200px"
CssClass="textbox"
TextMode="Password" />
</td> <td align="left" width="333px" height="40px">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txtPassword"
ErrorMessage="Required Field" ForeColor="Red"
ValidationGroup="A">*</asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender
ID="RequiredFieldValidator2_ValidatorCalloutExtender"
runat="server" Enabled="True"
TargetControlID="RequiredFieldValidator2">
</asp:ValidatorCalloutExtender> </td> </tr> <tr>
<td align="right" height="40px" width="333px">
</td> <td align="center" height="40px" width="333px">
<asp:Button ID="btnShowResult" runat="server"
OnClick="btnShowResult_Click" Text="Show Result"
ValidationGroup="A" Width="100px" CssClass="myButton" />
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 43
&nbsp;&nbsp; <asp:Button ID="btnClear" runat="server"
Text="Clear" Width="100px" CssClass="myButton" />
</td> <td align="left" height="40px" width="333px">
</td> </tr>
</table> </div>
</asp:Panel> <asp:Panel ID="Panel1" runat="server"
BackColor="#FFFF99" Style="margin-left: 32px" Width="927px"
BackImageUrl="~/Images/HomBack.jpg">
<div align="center">
<asp:GridView ID="gridUser" runat="server"
AutoGenerateColumns="false" Width="100%">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" Visible="false" />
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:BoundField DataField="SubjectName" HeaderText="Subject"
/>
<asp:BoundField DataField="ObtainedMarks"
HeaderText="Obtained Marks" />
<asp:BoundField DataField="ExamDate" HeaderText="Exam Date"
/>
</Columns> </asp:GridView> </div> </asp:Panel>
</asp:Content>
Web.Config:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET
application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="GreenExamConnectionString" connectionString="Data
Source=USERSQLEXPRESS;Initial
Catalog=GreenExamDB;Integrated Security=True"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"> <assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral,
publicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=B77A5C561934E089"/></assemblies></compilatio
n>
</system.web> </configuration>
View Code:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 44
AddQuestion.aspx.cs
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;
namespace GreenExam
{
public partial class AddQuestion : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlDataAdapter ad = null;
SqlCommand cmd = null;
SqlDataReader reader;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FillDDLSubject();
FillGrid();
}}
private void FillGrid()
{
try
{
DataSet ds = new DataSet();
ad = new SqlDataAdapter("Select QuestionMaster.Id as Id,
SubjectMaster.SubjectName as Subject, Question, Option1, Option2,
Option3, Option4, Answer from QuestionMaster,SubjectMaster where
QuestionMaster.SubjectId = SubjectMaster.Id", con);
ad.Fill(ds);
gridQuestions.DataSource = ds;
gridQuestions.DataBind();
}
catch (Exception)
{
Clear();
}
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 45
}
private void FillDDLSubject()
{
try
{
con.Open();
cmd = new SqlCommand("Select Id,SubjectName from
SubjectMaster", con);
reader = cmd.ExecuteReader();
while (reader.Read())
{
ddlSubject.Items.Add(new ListItem(reader[1].ToString(),
reader[0].ToString()));
}
reader.Close();
con.Close();
}
catch (Exception ex)
{
throw ex;
}
}
protected void linkEdit_Click(object sender, EventArgs e)
{
ImageButton link = (ImageButton)sender;
int id = Convert.ToInt32(link.CommandArgument);
try
{
con.Open();
cmd = new SqlCommand("Select Id, SubjectId, Question, Option1,
Option2, Option3, Option4, Answer from QuestionMaster where Id
=" + id + "", con);
reader = cmd.ExecuteReader();
while (reader.Read())
{
HiddenField1.Value = Convert.ToString(reader["Id"]);
ddlSubject.SelectedValue = Convert.ToString(reader["SubjectId"]);
txtQuestion.Text = Convert.ToString(reader["Question"]);
txtOption1.Text = Convert.ToString(reader["Option1"]);
txtOption2.Text = Convert.ToString(reader["Option2"]);
txtOption3.Text = Convert.ToString(reader["Option3"]);
txtOption4.Text = Convert.ToString(reader["Option4"]);
ddlAnswer.SelectedValue = Convert.ToString(reader["Answer"]);
}
btnSave.Text = "Update";
}
catch (Exception)
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 46
{
Clear();
}
finally
{
reader.Close();
con.Close();
}}
// <<=========To Delete SUBJECT ================>> //
protected void linkDelete_Click(object sender, EventArgs e)
{
ImageButton link = (ImageButton)sender;
int id = Convert.ToInt32(link.CommandArgument);
try
{
con.Open();
cmd = new SqlCommand("Delete from QuestionMaster where Id =
@Id", con);
cmd.Parameters.AddWithValue("@Id", id);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Question has been deleted successfully.');", true);
Clear();
FillGrid();
}
catch (Exception)
{
Clear();
}
FillGrid();
}
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
if (btnSave.Text == "Save")
{
con.Open();
cmd = new SqlCommand("Insert into QuestionMaster
(SubjectId, Question, Option1, Option2, Option3, Option4, Answer)
values (@SubjectId, @Question, @Option1, @Option2, @Option3,
@Option4, @Answer)", con);
cmd.Parameters.AddWithValue("@SubjectId",
ddlSubject.SelectedValue);
cmd.Parameters.AddWithValue("@Question", txtQuestion.Text);
cmd.Parameters.AddWithValue("@Option1", txtOption1.Text);
cmd.Parameters.AddWithValue("@Option2", txtOption2.Text);
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 47
cmd.Parameters.AddWithValue("@Option3", txtOption3.Text);
cmd.Parameters.AddWithValue("@Option4", txtOption4.Text);
cmd.Parameters.AddWithValue("@Answer",
ddlAnswer.SelectedValue);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Question has been inserted successfully.');", true);
}
else if (btnSave.Text == "Update")
{
con.Open();
cmd = new SqlCommand("Update QuestionMaster set
SubjectId=@SubjectId, Question=@Question, Option1=@Option1,
Option2=@Option2, Option3=@Option3, Option4=@Option4,
Answer=@Answer where Id=@Id", con);
cmd.Parameters.AddWithValue("@SubjectId",
ddlSubject.SelectedValue);
cmd.Parameters.AddWithValue("@Question", txtQuestion.Text);
cmd.Parameters.AddWithValue("@Option1", txtOption1.Text);
cmd.Parameters.AddWithValue("@Option2", txtOption2.Text);
cmd.Parameters.AddWithValue("@Option3", txtOption3.Text);
cmd.Parameters.AddWithValue("@Option4", txtOption4.Text);
cmd.Parameters.AddWithValue("@Answer", ddlAnswer.Text);
cmd.Parameters.AddWithValue("@Id", HiddenField1.Value);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Question has been updated successfully.');", true);
}
Clear();
FillGrid();
}
catch (Exception)
{
Clear();
}}
protected void btnClear_Click(object sender, EventArgs e)
{
Clear();
}
private void Clear()
{
ddlAnswer.SelectedIndex = 0;
ddlSubject.SelectedIndex = 0;
txtOption1.Text = null;
txtOption2.Text = null;
txtOption3.Text = null;
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 48
txtOption4.Text = null;
txtQuestion.Text = null;
btnSave.Text = "Save";
txtQuestion.Focus();
}}}
AddSubject.aspx.cs
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;
namespace GreenExam
{
public partial class AddSubject : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlDataAdapter ad = null;
SqlCommand cmd = null;
SqlDataReader reader;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FillGrid();
}
}
private void FillGrid()
{
try
{
DataSet ds = new DataSet();
ad = new SqlDataAdapter("Select * from SubjectMaster", con);
ad.Fill(ds);
gridSubjects.DataSource = ds;
gridSubjects.DataBind();
}
catch (Exception)
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 49
Clear();
}
}
protected void linkEdit_Click(object sender, EventArgs e)
{
ImageButton link = (ImageButton)sender;
int id = Convert.ToInt32(link.CommandArgument);
try
{
con.Open();
cmd = new SqlCommand("Select Id,SubjectName,Description from
SubjectMaster where Id=" + id + "", con);
reader = cmd.ExecuteReader();
while (reader.Read())
{
HiddenField1.Value = Convert.ToString(reader["Id"]);
txtSubject.Text = Convert.ToString(reader["SubjectName"]);
txtDescription.Text = Convert.ToString(reader["Description"]);
}
btnSave.Text = "Update";
}
catch (Exception)
{
Clear();
}
finally
{
reader.Close();
con.Close();
}
}
// <<========== To Delete sUBJECT ===========>> //
protected void linkDelete_Click(object sender, EventArgs e)
{
ImageButton link = (ImageButton)sender;
int id = Convert.ToInt32(link.CommandArgument);
try
{
con.Open();
cmd = new SqlCommand("Delete from SubjectMaster where Id =
@Id", con);
cmd.Parameters.AddWithValue("@Id", id);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Subject has been deleted successfully.');", true);
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 50
Clear();
FillGrid();
}
catch (Exception)
{
Clear();
}
FillGrid();
}
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
if (btnSave.Text == "Save")
{
con.Open();
cmd = new SqlCommand("Insert into SubjectMaster
(SubjectName,Description) VALUES
(@SubjectName,@Description)", con);
cmd.Parameters.AddWithValue("@SubjectName", txtSubject.Text);
cmd.Parameters.AddWithValue("@Description",
txtDescription.Text);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Subject has been inserted successfully.');", true);
}
else if (btnSave.Text == "Update")
{
con.Open();
cmd = new SqlCommand("Update SubjectMaster set SubjectName =
@SubjectName,Description = @Description where Id = @Id", con);
cmd.Parameters.AddWithValue("@SubjectName", txtSubject.Text);
cmd.Parameters.AddWithValue("@Description",
txtDescription.Text);
cmd.Parameters.AddWithValue("@Id", HiddenField1.Value);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Subject has been updated successfully.');", true);
}
Clear();
FillGrid();
}
catch (Exception)
{
Clear();
}
}
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 51
protected void btnClear_Click(object sender, EventArgs e)
{
Clear();
}
private void Clear()
{
txtDescription.Text = null;
txtSubject.Text = null;
btnSave.Text = "Save";
txtSubject.Focus();
}
}
}
AdminHome.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GreenExam
{
public partial class AdminHome : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}}}
AdminMaster.Master.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GreenExam
{
public partial class AdminMaster : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 52
}
protected void linkLogout_Click(object sender, EventArgs e)
{
Response.Redirect("Home.aspx");
}}}
Certificate.aspx.cs
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;
namespace GreenExam
{
public partial class Certificate : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlCommand cmd = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["UserId"] != null)
{
try
{
con.Open();
cmd = new SqlCommand("Select Name from Registration where Id="
+ Convert.ToInt32(Session["UserId"]) + "", con);
string name = Convert.ToString(cmd.ExecuteScalar());
con.Close();
lblUserName.Text = name;
if (Session["optainedMarks"] != null)
{
lblMarksObtained.Text = Session["optainedMarks"].ToString();
}
}
catch (Exception)
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 53
}}}}}}
Exam.aspx.cs
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;
namespace GreenExam
{
public partial class Exam : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlCommand cmd = null;
SqlDataReader reader = null;
#region [Global Variables]
int min, sec;
string min1, sec1;
int subjectId;
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (Session["min"] != null && Session["sec"] != null &&
Session["Subject"] != null)
{
min = (int)Session["min"];
sec = (int)Session["sec"];
subjectId = Convert.ToInt32(Session["Subject"]);
if (sec <= 9)
sec1 = "0" + sec;
else
sec1 = "" + sec;
if (min <= 9)
min1 = "0" + min;
else
min1 = "" + min;
lblTimer.Text = "" + min1 + ":" + sec1;
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 54
}
if (lblTimer.Text == "00:01")
{
InsertUserInfo();
Response.Redirect("Certificate.aspx");
}
if (!IsPostBack)
{
try
{
con.Open();
cmd = new SqlCommand("Select Name from Registration where Id="
+ Convert.ToInt32(Session["UserId"]) + "", con);
string name = Convert.ToString(cmd.ExecuteScalar());
con.Close();
lblUserName.Text = name;
}
catch (Exception)
{
}
Session["optainedMarks"] = 0;
lblQno.Text = "1";
GenerateQuestion();
}
}
private void GenerateQuestion()
{
try
{
radOptions.Items.Clear();
con.Open();
cmd = new SqlCommand("Select top 1 * from QuestionMaster where
SubjectId=" + subjectId + " order by NEWID()", con);
reader = cmd.ExecuteReader();
while (reader.Read())
{
lblQuestion.Text = reader["Question"].ToString();
radOptions.Items.Add(new ListItem(reader["Option1"].ToString(),
"Option1"));
radOptions.Items.Add(new ListItem(reader["Option2"].ToString(),
"Option2"));
radOptions.Items.Add(new ListItem(reader["Option3"].ToString(),
"Option3"));
radOptions.Items.Add(new ListItem(reader["Option4"].ToString(),
"Option4"));
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 55
Session["CorrectAns"] = reader["Answer"].ToString();
}
reader.Close();
con.Close();
}
catch (Exception)
{
}
}
private void InsertUserInfo()
{
try
{
con.Open();
cmd = new SqlCommand("Insert into Results (SubjectId,
UserId, ObtainedMarks,ExamDate) values (@SubjectId, @UserId,
@ObtainedMarks,@ExamDate)", con);
cmd.Parameters.AddWithValue("@SubjectId", subjectId);
cmd.Parameters.AddWithValue("@UserId",
Convert.ToInt32(Session["UserId"]));
cmd.Parameters.AddWithValue("@ObtainedMarks",
Convert.ToInt32(Session["optainedMarks"]));
cmd.Parameters.AddWithValue("@ExamDate",
Convert.ToDateTime(DateTime.Now.ToShortDateString()));
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception)
{
}}
protected void Timer1_Tick(object sender, EventArgs e)
{
if (sec == 0)
{
min = min - 1;
sec = 59;
}
Session["min"] = min;
Session["sec"] = sec;
System.Threading.Thread.Sleep(500);
if (sec <= 9)
sec1 = "0" + sec;
else
sec1 = "" + sec;
if (min <= 9)
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 56
min1 = "0" + min;
else
min1 = "" + min;
lblTimer.Text = "" + min1 + ":" + sec1;
sec = sec - 1;
Session["min"] = min;
Session["sec"] = sec;
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
if
(radOptions.SelectedValue.ToString().Equals(Convert.ToString(Sessi
on["CorrectAns"])))
{
Session["optainedMarks"] =
Convert.ToInt32(Session["optainedMarks"]) + 1;
}
if (lblQno.Text == "10")
{
InsertUserInfo();
Response.Redirect("Certificate.aspx");
}
GenerateQuestion();
int qno = Convert.ToInt32(lblQno.Text);
int questionNo = qno + 1;
lblQno.Text = Convert.ToString(questionNo);
}
catch (Exception)
{
}
}
protected void btnSkip_Click(object sender, EventArgs e)
{
if (lblQno.Text == "10")
{
InsertUserInfo();
Response.Redirect("Certificate.aspx");
}
GenerateQuestion();
int qno = Convert.ToInt32(lblQno.Text);
int questionNo = qno + 1;
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 57
lblQno.Text = Convert.ToString(questionNo);
}}}
ExamResults.aspx.cs
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;
namespace GreenExam
{
public partial class ExamResults : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlDataAdapter ad = null;
SqlCommand cmd = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FillGrid();
}}
private void FillGrid()
{
try
{
DataSet ds = new DataSet();
ad = new SqlDataAdapter("Select Results.Id as
Id,Name,SubjectName,ObtainedMarks,ExamDate from
Results,SubjectMaster,Registration where
Results.SubjectId=SubjectMaster.Id and
Results.UserId=Registration.Id", con);
ad.Fill(ds);
gridUser.DataSource = ds;
gridUser.DataBind();
}
catch (Exception)
{
}
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 58
}
protected void linkDelete_Click(object sender, EventArgs e)
{
ImageButton link = (ImageButton)sender;
int id = Convert.ToInt32(link.CommandArgument);
try
{
con.Open();
cmd = new SqlCommand("Delete from Results where Id = @Id",
con);
cmd.Parameters.AddWithValue("@Id", id);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('Result has been deleted successfully.');", true);
FillGrid();
}
catch (Exception)
{
}
FillGrid();
}}}
Instructions.aspx.cs
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;
namespace GreenExam
{
public partial class Instructions : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlDataAdapter ad = null;
SqlCommand cmd = null;
SqlDataReader reader;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 59
FillDDLSubject();
}
}
private void FillDDLSubject()
{
try
{
con.Open();
cmd = new SqlCommand("Select Id,SubjectName from
SubjectMaster", con);
reader = cmd.ExecuteReader();
while (reader.Read())
{
ddlSubject.Items.Add(new ListItem(reader[1].ToString(),
reader[0].ToString()));
}
reader.Close();
con.Close();
}
catch (Exception ex)
{
throw ex;
}}
protected void btnStartExam_Click(object sender, EventArgs e)
{
Session["min"] = 10;
Session["sec"] = 0;
Session["Subject"] = ddlSubject.SelectedValue;
Response.Redirect("Exam.aspx");
}}}
Login.aspx.cs
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;
namespace GreenExam
{
public partial class Login : System.Web.UI.Page
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 60
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlCommand cmd = null;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLogin_Click(object sender, EventArgs e)
{
try
{
con.Open();
cmd = new SqlCommand("Select count(Id) from AdminLogin where
UserName = @UserName and Password = @Password", con);
cmd.Parameters.AddWithValue("@UserName", txtUserName.Text);
cmd.Parameters.AddWithValue("@Password", txtPassword.Text);
int count = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
if (count > 0)
{
Response.Redirect("AdminHome.aspx");
}
else
{
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('User name or Password does not exist.');", true);
txtPassword.Text = null;
}
}
catch (Exception)
{
Clear();
}
}
protected void btnClear_Click(object sender, EventArgs e)
{
Clear();
}
private void Clear()
{
txtPassword.Text = null;
txtUserName.Text = null;
}}}
Master.Master.cs
using System;
using System.Collections.Generic;
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 61
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GreenExam
{
public partial class Master : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}}}
NewRegistration.aspx.cs
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;
namespace GreenExam
{
public partial class NewRegistration : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlCommand cmd = null;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
con.Open();
cmd = new SqlCommand("Insert into Registration (Name,
MobileNo, EmilId, UserName, Password) VALUES (@Name,
@MobileNo, @EmilId, @UserName, @Password)", con);
cmd.Parameters.AddWithValue("@Name", txtName.Text);
cmd.Parameters.AddWithValue("@MobileNo", txtMobileNo.Text);
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 62
cmd.Parameters.AddWithValue("@EmilId", txtEmailId.Text);
cmd.Parameters.AddWithValue("@UserName", txtUserName.Text);
cmd.Parameters.AddWithValue("@Password", txtPassword.Text);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("OnlineExam.aspx");
}
catch (Exception)
{
Clear();
}
}
protected void btnClear_Click(object sender, EventArgs e)
{
Clear();
}
private void Clear()
{
txtConfirmPassword.Text = null;
txtEmailId.Text = null;
txtMobileNo.Text = null;
txtName.Text = null;
txtPassword.Text = null;
txtUserName.Text = null;
}}}
OnlineExam.aspx.cs
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;
namespace GreenExam
{
public partial class OnlineExam : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlCommand cmd = null;
SqlDataReader reader = null;
protected void Page_Load(object sender, EventArgs e)
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 63
}
protected void btnClear_Click(object sender, EventArgs e)
{
Clear();
}
private void Clear()
{
txtPassword.Text = null;
txtUserName.Text = null;
}
protected void btnLogin_Click(object sender, EventArgs e)
{
try
{
con.Open();
cmd = new SqlCommand("Select Id,UserName,Password from
Registration where UserName = @UserName and Password =
@Password", con);
cmd.Parameters.AddWithValue("@UserName", txtUserName.Text);
cmd.Parameters.AddWithValue("@Password", txtPassword.Text);
reader = cmd.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
Session["UserId"] = reader["Id"].ToString();
Response.Redirect("Instructions.aspx");
}}}
catch (Exception)
{
Clear();
}
finally
{
reader.Close();
con.Close();
}}}}
ShowUserInfo.aspx.cs
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;
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 64
namespace GreenExam
{
public partial class ShowUserInfo : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlDataAdapter ad = null;
SqlCommand cmd = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FillGrid();
}
}
private void FillGrid()
{
try
{
DataSet ds = new DataSet();
ad = new SqlDataAdapter("Select * from Registration", con);
ad.Fill(ds);
gridUser.DataSource = ds;
gridUser.DataBind();
}
catch (Exception)
{
}
}
protected void linkDelete_Click(object sender, EventArgs e)
{
ImageButton link = (ImageButton)sender;
int id = Convert.ToInt32(link.CommandArgument);
try
{
con.Open();
cmd = new SqlCommand("Delete from Registration where Id = @Id",
con);
cmd.Parameters.AddWithValue("@Id", id);
cmd.ExecuteNonQuery();
con.Close();
ScriptManager.RegisterStartupScript(this, GetType(), "abc",
"alert('User has been deleted successfully.');", true);
FillGrid();
}
catch (Exception)
{
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 65
}
FillGrid();
}
}
}
UserResults.aspx.cs
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;
namespace GreenExam
{
public partial class UserResults : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa
mConnectionString"].ConnectionString);
SqlCommand cmd = null;
SqlDataAdapter ad = null;
SqlDataReader reader = null;
protected void Page_Load(object sender, EventArgs e)
{
}
private void Clear()
{
txtPassword.Text = null;
txtUserName.Text = null;
}
private void FillGrid()
{
try
{
DataSet ds = new DataSet();
ad = new SqlDataAdapter("Select Results.Id as
Id,Name,SubjectName,ObtainedMarks,ExamDate from
Results,SubjectMaster,Registration where
Results.SubjectId=SubjectMaster.Id and
Results.UserId=Registration.Id and Results.UserId=" +
Convert.ToInt32(Session["Id"]) + "", con);
ad.Fill(ds);
gridUser.DataSource = ds;
gridUser.DataBind();
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 66
5.2 Testing Approach
During the development of new system, the testing of the system
which is currently being developed is more important for successful
implementation of the project. At the time of system development we did a
testing by two ways, first unit wise and then system wise.
The development process involves various types of testing. Each
test type addresses a specific testing requirement.
5.2.1 Unit Testing
At the initial level for development of the “Green Exam” (i.e.
Online Examination System) the first testing is done at Unit Level (i.e.
testing is performed on small parts) therefore it is called as Unit Testing. This
testing is done to find the errors occurred during the establishing of the
project. In this testing the source code of the system is processed into a
module, which turns into a small part called as Units. These units have
specific behaviours and testing taking place on these units is called Unit
Testing. Due to this atomic level testing it is also referred as White Box
testing.
The Unit Testing is done to the basis of the language used in the
project. In our system the C# (i.e. C-Sharp) language is used, on which the
unit testing is performed. Unit test ensure that each unique path of the project
perform accurately to the documented specification and contain clearly
defined input and expected result.
In our system we does the unit testing in followings ways
• We test that each module is working properly or not.
• The testing of each text field has taken the proper values and are they
stored into database files.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 67
The testing of an individual module is done at the runtime and find that there
are not any errors occurred.
5.2.2 Integrated Testing
Integration testing is the process of validating proper functionality
between two or more components. Some developers may use different
definitions of a "component", so first one should determine the type of
integration being performed. The most common use of the concept of
integration testing is directly after unit testing.
All units are developed and they will be tested individually by itself
during unit test, and then they are integrated with surrounding (i.e. other
associated parts/units) units in the program. Integration testing could also be
described as the validation of multiple programs in an application/website, in
an organisation, multiple applications/ website in an organisations/private
institutes, or multiple companies in a network.
5.2.3 System Testing
The project “Green Exam” (i.e. Online Examination System) is
developed by using several modules. There are several modules constitute in
the project. Once all the modules are integrated by connecting them, the
several errors can be occurred during the execution of the developed system
therefore at this moment the testing of the system under development phase
must be done. After integration of all the modules in the current system are
must get tested therefore it is called as System Testing.
It is a testing which tests the whole system after the completion and
integration of each module. The system testing ensures the entire integration
of the module gives specific software/website. System testing of software or
hardware is testing conducted on a complete, integrated system to evaluate
the system’s compliance with the specified requirement.
Due to testing occurred on external perspective of the test object to
drive test cases it be referred as Black box testing. System Testing falls
within the scope of black box testing, and as such, should require no
knowledge of the inner design of the code or logic.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 68
5.3 Implementation and Maintenance
Implementation phase involves the practical usage of the
system/product that we created yet. In this phase the client for which the
system is developed can use/handle the system.
Maintenance phase involves correcting some mistakes if
occoured/making modifications if required. Generally developers build the
system which fulfil all the requirements of the clients. Sometimes it may
happen that even client also unale to collect/acquire the information about all
the requirements. In such cases the solution is that after completion of project
upgradations can be done which is nothing but the maintenance.
After implementation the webite looks as follows:
Home page:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 69
Online Exam:
New Registration:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 70
Results:
Admin login:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 71
Admin Loged in:
Add Subject:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 72
Exam Results:
Add Question:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 73
User Info:
After User Login and Subject Selection:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 74
Exam Started:
At The end of exam:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 75
Wrong Answered questions:
Certificate is generated:
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 76
When user clicks on Print button:
CHAPTER 6
CONCLUSION
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 77
6. CONCLUSION
6.1 Limitations of the System
• Green Exam is nothing but same as online examination therefore without
internet it is impossible to conduct the exams.
• It requires a lot of electronic resources like CPU, Monitor, Keyboard, etc.
• Therefore it consumes a lot of electricity.
• Due to manual test exams user may be unable to understand the personal
computers therefore he/she must have knowledge and experience of using
the PCs.
• The organization where these examinations will be conducted must have
the generator/inverter in case of sudden blackout/power off.
6.2 Conclusion
This project offers an Online Examination services to the user.
These services efficient for exam conduction for multiple users with proper
security within particular time with the help of timer supported by this
system. This enhances overall reliability and availability of the services while
simultaneously ensuring server farm accessibility. In this project we use
latest technology like .NET.
Finally we want to state that, our project has provided an efficient
examination conducting services using fast processing and consequently
speeds up the performance. This gives the fastest output to the user which is
our goal also it give printed output to user. By this project, we can improve
our exam system. This project is need of today’s era. This project is best
alternative for objective type of exam in each and every sector like Govt.
sector, private sector, and corporate sector. Also this is need of today’s
fastest era.
GREEN EXAM
M.Sc. Final (Computer Science) Sem-IV Page 78
6.3 Future Scope of the Project
Today’s era is computers and mobile era. When the development
increases, no one people have time. Also mobile network is becoming large
network & provides the facility of internet. Today’s technology is 2G.After
sometime 3G is all over the world.
.
3G provides the facility for the heavy use of internet on mobiles. Due
to this system we reduce hardware, software & power supply cost is reduced.
So, In future, we have to convert this project into mobile based
examination system. By converting this project to mobile based examination
system, we can give the test or examination on mobile. Due to mobile lot of
time of examinee, time required for arrangement of exam is also saved. By
using this on mobile, we increase flexibility of online examination systems.
This project also uses in Govt. sector exams that require more time to
conduct exams. Time Reducing is main power of this project. Project should
become popular in activities like campus recruitment, exams of Govt. sector,
private sector etc.
CHAPTER 7
BIBLIOGRAPHY
7. BIBLIOGRAPHY
1) The Complete Reference ASP.NET by MacDonald (TMH).
2) Programming with Microsoft ASP.NET 3.5 by Dino Esposito,
Microsoft Press.
3) Microsoft ASP.NET Step by Step (Microsoft Press) - G.
Andrew Duthrie
4) Debugging ASP.NET (New Riders) - Jonathon Goodyear, Brian
Peek,
Brad Fox.
5) Deploying and Managing Microsoft .NET Web Farms (Sams) -
Barry Bloom.
6) http://www.codeproject.com/webservices/articlerss.aspx
7) http://www.delphibasics.co.uk/Net.html
8) http://www.search.com/reference/.net_framework
9) www.dotnetfunda.com/articles/article1419-weak-references-in-
net-.aspx
For More Seminars and Projects
Google/refer following Recommended
Links:-
1) Pritambhansali.blogspot.com
2) Edumeet. blogspot.com
3) SlideShare.com/pritambhansali
4) Scribd.com/pritambhansali
5) Youtube.com/TechEduTV

Pritam bhansali Online Exam - Project Report

  • 1.
    PROJECT REPORT ON GREEN EXAM Submittedto Rashtrasant Tukadoji Maharaj Nagpur University, NAGPUR In partial fulfillment of the requirement of M.Sc. Final (Computer Science) Examination Submitted by Pritam S. Bhansali Under the guidance of Under the co-guidance of Prof. R. N. Jugele Mrs. S. S. Khandalkar Associate Professor Lecturer (Department of Computer Science) (Department of Computer Science) DEPARTMENT OF COMPUTER SCIENCE Shri Shivaji Education Society Amravati’s SCIENCE COLLEGE Congress Nagar, Nagpur-12. 2013-2014
  • 2.
    DECLARATION To, The Principal Shri ShivajiScience College, Congress Nagar, Nagpur-440012 Respected Sir, I the under signed, hereby declare that the project work entitled “GreenExam” submitted to Rashtrasant Tukadoji Maharaj Nagpur University, Nagpur is our independent work. This is my original work and has not been submitted anywhere for degree/diploma. The system presented here is not been duplicated from any other source. I understand that any such copying is liable to be punished in any way the University authority may deem fit. Thanking You. Place: Nagpur Yours Sincerely Date: Mr. Pritam S. Bhansali
  • 3.
    Department of ComputerScience Shri Shivaji Education Society Amravati’s Science College, Congress Nagar, Nagpur-12 CERTIFICATE This is to certify that Pritam S. Bhansali has successfully prepared the project report entitled “GreenExam” under my supervision towards the partial fulfillment of the requirement of M.Sc.-Final (Computer Science) Semester-IV Examination submitted to Rashtrasant Tukadoji Maharaj Nagpur University, Nagpur during the academic year 2013-2014. Place: Nagpur Project Guide Date: Prof. R. N. Jugele Associate Professor (Department of Computer Science)
  • 4.
    ACKNOWLEDGEMENT I wish toexpress my sincere thanks to many persons who helped us to develop the project. I extend my thanks to respected Principal Dr. D. K. Burghate, Shivaji Science College, Nagpur for providing the infrastructure and facilities without which it would have been impossible to complete this hard task. In this respect I thank to, Prof. S. R. Pande Head of Department of computer science for his valuable guidance encouragement and supervision throughout this project. My foremost thanks to Prof. R. N. Jugele, who has guided as in completing this project report, I take the opportunity to express the deep sense of gratitude and whole thanks for his inspiration and guidance throughout the course of this project. I am thankful to my Co-Guide Lect. S. S. Khandalkar for her constant inspiration and guidance throughout the course of this project work. I express my gratitude to all members of teaching and non-teaching staff of the Department of Computer Science for their co-operation during the verification of the project. Finally I thanks to my friends and especially who helped us in my endeavours. Place: Nagpur Date: Mr. Pritam S. Bhansali
  • 5.
    INDEX Sr. No. NameOf Topics Page No. 1. INTRODUCTION 1.1 Background 1.2 Objectives 1.3 Proposed System 1.3.1 Purpose 1.3.2 Scope 1-4 2. SURVEY OF TECHNOLOGY 5 3. REQUIREMENTS AND ANALYSIS 3.1 Problem Definition 3.2 Planning and Scheduling 3.3 Software and Hardware Requirements 3.4 Feasibility Study 3.4.1 Economic 3.4.2 Technical 3.4.3 Operational 6-10 4. SYSTEM DESIGN 4.1 Program Flowchart 4.2 Basic Modules 4.3 Data Design 4.3.1 Data Design 4.3.2 Data Dictionary and Data Views 4.3.3 E-R diagram and DFDs 4.4 UML Diagram 4.4.1 Hierarchy Diagram 4.4.2 Use Case Diagram 4.4.3 Activity Diagram 4.4.4 Sequence Diagram 11-21 5. IMPLEMENTATION AND TESTING 5.1 Coding Details 5.2 Testing Approach 5.2.1 Unit Testing 5.2.2 Integrated Testing 5.2.3 System Testing 5.3 Implementation and Maintenance 22-76 6. CONCLUSION 6.1 Limitations of the System 6.2 Conclusion 6.3 Future Scope of the Project 77-78 7. BIBLIOGRAPHY 79
  • 6.
  • 7.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 1 1. INTRODUCTION In today’s world the advancement of technology and the use of internet is rapidly increasing. The day by day there is a huge increment in the number of users accessing the internet. In each and every department whether it is banking, financing, shopping there is use of internet. Due to increasing number of objective type of exam and requirement of fast result this system is very beneficial. The solution of this problem is to conduct objective type exam by online with help of online examination system using internet connection. In campus recruitment, government sector, private sector there are number of exam conducted day by day, the people who gives the exam and system who conduct the exam want fastest result and recruitment. So, we have developed this system to provide this type of functionality. This system also provide security to the user as well as administrator. This is very flexible system for user, administrator and exam conductors. 1.1 Background This system is used to conduct the exam on online. It has the administration part which is used to insert the question, show the result of examination, how many students have seated for the examination and so on. All this things control by the administrator. There is also the part of registration which is used by the users to enrol their name to site for the examinations. The user also can see the result after the examination finished which reduce their work. The administrator can also set the paper for the examination for the student. The administrator can control the operation such as editing, controlling, and managing. While examination there is provision for the user to do the question next if the user doesn’t want to attempt the question and the program automatically make the changes into the database. This project provides the flexibility to the user as well as the administrator. This project also has flexibility to the programming as well as to the database.
  • 8.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 2 1.2 Objectives • To design and develop the online quiz system. • To allow admin to create questions. • Questions can have multiple options, multiple answers or can be text answers. • To allow faculty to give additional time to user with respect to points earn. • To allow automatic grading which can be recorded per test. • To minimize the consumption of natural resources like pen, pencils, papers …etc. • This ultimately saves cost and the natural resources like trees. • This concept helps the students to know about their caliber and secured score/marks immediately without waiting for several months. • In addition to this the certificates are also rewarded immediately which includes name of examinee, secured marks by examinee, etc. • To make the grading and testing system more easy, accurate, reliable. • Online examination is the platform where larger/bigger examinations can get conducted without human resources. Once the system is built by the web developers then it is intelligent enough to manipulate and conduct the tests/examinations automatically. • The intelligence level depends on the developers which are intended to develop the system according to requirements gathered. 1.3 Proposed System 1.3.1 Purpose This is the era of computer. So everyone required every things quickly so we decides to quick exam like online exam, because on paper exam or offline exam required more paper, time & money. So this is waste for exam process. In on paper exam, lot of work should be done such as sitting arrangement for all the examinee at one time. In on paper exam, a lot of instructor or invigilator required. In this system, all the examinee have same question paper so that examinee have chance to ask to his friends .In
  • 9.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 3 this system, paper checking is also vast process which require more efforts like more than one people checks the paper and then displays the result. In this system, examinee waited long time for declaring results. In recent years, the use of electronic online quiz systems has become quite popular due to pressures of increasing class sizes, and the need for more efficient methods of assessing distant students. This thing motivates us to work with web based quiz system. We also have tried to eliminate the problem with general web based quiz system and decide to create a web based intelligent quiz system. In our thesis project, we have tried to develop an “Online Intelligent Quiz System” which will be popular with both the students and teachers. In our proposed project, we design our project more user friendly. We use online mechanism for exam conduction. Today’s era is very fast, so everyone wants fast results of their work. In our proposed project, we avoid the above problems that are in on paper or offline exam. In our project, we avoid the problem of sitting arrangement by arranging computers and exam should be conducted in different batches. In this system, one or more invigilator required. In this system, all the examinee have different question paper so the problem of mischiefs is avoided. In this system, paper checking is not difficult task because it is checked by computer programs. It also shows the printed results are shown immediately. Therefore the online exam the best option to the objective type exam because it reduce the man power, also every process is secure. 1.3.2 Scope This can be used in educational institutions as well as in corporate world as well as no restriction that examiner has to be present when the candidate appears for the test. This concept can also be used in the field of health care where the patients can find the remedies for his health related problems just by answering some questioners provided on the screen and at the last the list of medicines, prescriptions, daily exercises, etc. will be generated as a result.
  • 10.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 4 In addition this concept can also be implemented in the corporate area as the market research known as Market Basket Analysis or in other words, for finding the patterns of purchasing of various kind of products by customers when customers appears in the shopping mall he/she can easily walk through 1 or 2 minutes of questioners like which product should he/she liked to purchase more?, at what quantity?, at what price?, which another product he/ she intent for free with previously purchased product?, etc. such questions and answers can be generated with the help of online examination systems.
  • 11.
  • 12.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 5 2. SURVEY OF TECHNOLOGY As we know that, examination is very important in student life. In school life, students give lot of exams and also in college life students give lot of tests, examinations. But all these things should be done on paper. A lot of work is required for exam conduction of this type. As the student goes from college also he should give the tests like, in training periods, in companies like Infosys, Mahindra takes lot of tests taken by them. Also, the usage of computer system is very fast & so it is therefore understood by nearly all people who discovered that this machine can perform a very vast variety of applications and can be easily used to enhance their working capabilities. Nowadays, Internet is one of the best and largest media to store and spread knowledge and information. In this 21st century, each and every person or near about 80% people are able to understand about computer, internet and applications related to it like websites, software’s and new different technologies related to it. The two basic things, mainly have given us an idea to make a project based on ‘Campus Recruitment Tests’. In this test, student’s first login for that test and then user selects the sections according to their subjects or interest. After that, questions are displayed on the page. Then user selects the answer for this questions and the result will display later on. Second is all test are time consuming .It takes lot of time for conducting of exam. All exams are conducted for one or more days. The idea of this project comes from online registration, online railway reservation, online banking, etc. In that all user makes their work online. So, we decided to develop project for Online Examination System. In which, examinee can give test online. We take example from some companies like Tech. Mahindra, Accenture, like corporate companies. These companies don’t give the result immediately to examine. But in our project, result should be displayed immediately. This idea comes from the Maharashtra Government MS-CIT examination. In this, we get immediately results after the finishing the exam.
  • 13.
  • 14.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 6 3. REQUIREMENTS AND ANALYSIS As the technology changes at such fast phase, every one try to cope up upgrading the systems consistently in order to stay competitive. It makes efficient use of the advance technology and has ambition to discover more. 3.1 Problem Definition This is the era of computer. So everyone required every things quickly so we decides to quick exam like online exam, because on paper exam or offline exam required more paper, time & money. So this is waste for exam process. In on paper exam, lot of work should be done such as sitting arrangement for all the examinee at one time. In on paper exam, a lot of instructor or invigilator required. In this system, all the examinee have same question paper so that examinee have chance to ask to his friends .In this system, paper checking is also vast process which require more efforts like more than one people checks the paper and then displays the result. In this system, examinee waited long time for declaring results. In our proposed project, we design our project more user friendly. We use online mechanism for exam conduction. Today’s era is very fast, so everyone wants fast results of their work. In our proposed project, we avoid the above problems that are in on paper or offline exam. In our project, we avoid the problem of sitting arrangement by arranging computers and exam should be conducted in different batches. In this system, one or more invigilator required. In this system, all the examinee have different question paper so the problem of mischiefs is avoided. In this system, paper checking is not difficult task because it is checked by computer programs. It also shows the printed results are shown immediately. Therefore the online exam the best
  • 15.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 7 option to the objective type exam because it reduce the man power, also every process is secure. 3.2 Planning and Scheduling In this phase what ever website/Software we are making we have to decide a road map for that particular S/W or website. This road map includes the timing and scheduling for that particular product on which we have to start the work. It includes Designning, Coding, Testing, Debugging, etc. all these parameters are decided as follows. 1 Design of the processes 25 days. 2 Coding : 40 days. 3 Testing : 15 days. 4 Analysis of Bugs : 20 days. 3.3 Software and Hardware Requirements The software and hardware requirements are as follows: SOFTWARE REQUIREMENTS Front End MS Visual Studio, Dream viewer, Eclipse, Net Beans, etc. Back End MS SQL Server, My SQL, Oracle. Frame Work DotNet, PHP, etc. OS Windows, Linux, Mac, etc. 3 HARDWARE REQUIREMENTS Processor P4 to Intel Core, AMD, etc. RAM Min512MB, Max. 2GB. Hard disk Min 10 GB.
  • 16.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 8 3.4 Feasibility Study Feasibility study is conducted to assist users in determining whether or not to implement our project cost. In this the feasibility study is based on extensive research on the various fields of proposed system. It is analysis of possible alternative solutions to a problem and recommendations on best alternatives. Therefore we should check the system format for its feasibility. The following feasibility criteria are considered for the project in order to ensure that the project does not have the major obstacles. Ones the existing system has been studied, it is the task of analyst to finalize the feasibility report. 3.4.1 Economic Feasibility study It is an evaluation of the development cost, weighted against the benefit derived from the developed system. The existing resources are efficient for developing the system and no extra hardware is required. Thus the system is economically feasible. System can be divided into development, Operating & Intangible costs. Operating cost in computer based information system includes- • Hardware/Software rental or description charge. • The salary of the computer operator & other data processing who will operate the new system. • The salary of computer analyst & computer programmers who perform the system maintenance function. • The cost of maintaining the proper fiscal facilities including power, light, heat, Air Condition, Building rental or other facility charges & equipment & building maintenance charges. It is very important to consider how cost varies over time. The rate of investment is always an important factor for managements especially in relation to the rate of return.
  • 17.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 9 Hardware used in this project is as follows: Software used in this project is as follows: Software Required Cost Operating system(Any) Rs.4000-10000 ASP.NET (C#) Freeware (some versions) MS SQL 2008 Freeware (some versions) 3.4.2 Technical Feasibility study During this, we specified require equipment’s that is hardware & software that can satisfy user requirement. It concern with time required for the output, response time, processing speed & data transfer rate of the project. Generally project configuration is more important than hardware make. This part covers all the technical requirements of the system of the courier. Technical feasibility is centred on the existing computer system i.e. H/W & S/W etc. The system requirements are required for the implementation; the system can be fulfilled by the management. Components Required Cost Pentium IV processor (CPU) or above. Rs. 2500-3500 RAM (minimum 512 MB) Rs. 750-950 Hard Disk Space(1 GB) Rs. 1000-1500 Monitor Rs. 3000-4000 Keyboard/Mouse Rs. 200-300
  • 18.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 10 The software which we are going to develop will be the most efficient and user friendly. This project will provide the different functionality to user. It is very useful for small as well as large organization. Proposed system is simple and easy to understand and use. It can be implemented with minimum cost requirements and with most basic hardware available. 3.4.3 Operational Feasibility study To solve the problems in Manual Quiz System they required a computerized system to handle all the works. They required a web based application that will provide a working environment that will be flexible and will provide ease of work and will reduce the time for report generation and other paper works. • System contains the answer of the question to set in the database. • When user is login then after there are some option to choose the test question paper. • After selecting the option the question randomly display on the screen. • After solving all the question, the answer are being check it out automatically. • The result of this test is then store into student details. • At last the result will display on the screen. Components name Required configuration Processor (CPU) Pentium IV RAM minimum 512 MB Hard Disk Space Minimum 1 GB Monitor Any Keyboard/Mouse Any
  • 19.
  • 20.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 11 4. SYSTEM DESIGN 4.1 Program Flowchart
  • 21.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 12 4.2 Basic Modules The basic modules in this project are as follows: 1. Home In this module we have designed our home page which is the start page of this website. 2. Online Exam This module inludes the login form to start the examination for particular user. But note that user should be previously registered. 3. New Registration This module inludes the registration form for new users which are wiling to appear for exams.In this module users have to fill up there information on that basis they can choose their user name and password. 4. Results This module inludes the the login form through which user can view their results. 5. Admin Login It includes the login form for admin. 6. About Us It includes the information about our website. 4.3 Data Design 4.3.1 Data Design Data sesign includes the relations that we have created in the database. Which contains all the crucial data that we are using in our website this data includes registration information, questions and answers, etc. Database
  • 22.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 13 Design: Table 1: AdminLogin Table 2: QuetionMaster Table 3: Registration
  • 23.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 14 Table 4: Results Table 5: SubjectMater: Data entered in the tables: 1) AdminLogin 2) QuetionMaster
  • 24.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 15
  • 25.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 16 3) Registration 4) Results: Results Displayed according to subjects name, user name, obtained marks and exam date: Query: “Select Results.Id as Id,Name,SubjectName,ObtainedMarks,ExamDate from Results,SubjectMaster,Registration where Results.SubjectId=SubjectMaster.Id and Results.UserId=Registration.Id;”
  • 26.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 17 5) SubjectMaster 4.3.2 Data Dictionary Data dictionary is the data structure which keep details of the contents of data flows, processes, and data stores. It is a structured repository of data about data. It is of rigorous definitions of all DFD data elements and data structures. We have seen the DFD early they only provide some descriptive information in different shapes with very least details. Therefore in such cases data dictionary is good option to store the details about those descriptive DFD sysmols.
  • 27.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 18 4.3.3 E-R diagram and DFDs E-R diagram
  • 28.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 19 Data Flow Diagram:
  • 29.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 20 4.4 UML Diagram 4.4.1 Use Case Diagram User Admin Registeration Appear for exam Add/Delete subjects Add/Delete View User Results Login Get the printout of certificate View/Delete Users Login
  • 30.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 21 4.4.3 Sequence Diagram
  • 31.
  • 32.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 22 5. IMPLEMENTATION AND TESTING 5.1 Coding Details Source Code: AddQuestion.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> `<asp:ScriptManager runat="server" ID="scr" /> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px; margin-right: 23px; Width="1025px" BackImageUrl="~/Images/HomBack.jpg"> <asp:HiddenField ID="HiddenField1" runat="server" /> <br /> <br /> <table border="0" width="1000px" cellpadding="0" cellspacing="0"> <tr> <td align="right" width="333px" height="40px"> <asp:Label ID="Label2" runat="server" Text="*" CssClass="style2"></asp:Label> <b>&nbsp; Select Subject : </b> </td> <td align="left" width="533px" height="40px"> <asp:DropDownList ID="ddlSubject" runat="server" Width="200px" class="dropDown"> <asp:ListItem Value="0">-- Select --</asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlSubject" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A" InitialValue="0">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator2_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator2"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label3" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; Question : </b> </td> <td align="left" width="533px" height="40px"> <asp:TextBox runat="server" ID="txtQuestion" Width="450px" class="textbox" />
  • 33.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 23 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtQuestion" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator3_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator3"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label4" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; Option 1 : </b> </td> <td align="left" width="533px" height="40px"> <asp:TextBox runat="server" ID="txtOption1" Width="350px" class="textbox" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtOption1" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator4_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator4"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label5" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; Option 2 : </b> </td> <td align="left" width="533px" height="40px"> <asp:TextBox runat="server" ID="txtOption2" Width="350px" class="textbox" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtOption2" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator5_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator5"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b>&nbsp; Option 3 : </b> </td>
  • 34.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 24 <td align="left" width="533px" height="40px"> <asp:TextBox runat="server" ID="txtOption3" Width="350px" class="textbox" /> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b>&nbsp;Option 4 : </b> </td> <td align="left" width="533px" height="40px"> <asp:TextBox runat="server" ID="txtOption4" Width="350px" class="textbox" /> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label7" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp;Answer : </b></td> <td align="left" width="533px" height="40px"> <asp:DropDownList ID="ddlAnswer" runat="server" Width="200px" class="dropDown"> <asp:ListItem Value="0">-- Select --</asp:ListItem> <asp:ListItem Value="Option1">Option 1</asp:ListItem> <asp:ListItem Value="Option2">Option 2</asp:ListItem> <asp:ListItem Value="Option3">Option 3</asp:ListItem> <asp:ListItem Value="Option4">Option 4</asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlAnswer" ErrorMessage="Required Field" InitialValue="0" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator6_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator6"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> </td> <td align="left" width="533px" height="40px"> <asp:Button ID="btnSave" runat="server" Text="Save" Width="100px" OnClick="btnSave_Click" ValidationGroup="A" class="myButton" /> &nbsp; <asp:Button ID="btnClear" runat="server" Text="Clear" Width="100px" OnClick="btnClear_Click" class="myButton" /> </td> </tr> </table> <br /> <br /> <div align="center"> <asp:GridView ID="gridQuestions" runat="server" AutoGenerateColumns="false" Width="100%"> <Columns>
  • 35.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 25 <asp:BoundField DataField="Id" HeaderText="Id" Visible="false" /> <asp:BoundField DataField="Subject" HeaderText="Subject" /> <asp:BoundField DataField="Question" HeaderText="Question" /> <asp:BoundField DataField="Option1" HeaderText="Option 1" /> <asp:BoundField DataField="Option2" HeaderText="Option 2" /> <asp:BoundField DataField="Option3" HeaderText="Option 3" /> <asp:BoundField DataField="Option4" HeaderText="Option 4" /> <asp:BoundField DataField="Answer" HeaderText="Answer" /> <asp:TemplateField HeaderText="Edit / Delete"> <ItemTemplate> <asp:ImageButton ID="linkEdit" CommandArgument='<%#Eval("Id") %>' runat="server" ImageUrl="~/Images/pencil.gif" ToolTip="Edit" Height="20px" Width="20px" OnClick="linkEdit_Click" /> | <asp:ImageButton ID="linkDelete" CommandArgument='<%#Eval("Id") %>' OnClientClick="return confirm('Do you want to delete the record..?');" runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete" Height="20px" Width="20px" Text="Edit" OnClick="linkDelete_Click" /> </ItemTemplate> </asp:TemplateField></Columns> </asp:GridView> </div> </asp:Panel> </asp:Content> AddSubject.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:ScriptManager runat="server" ID="scr" /> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <br /> <asp:HiddenField ID="HiddenField1" runat="server" /> <br /> <table border="0" width="1000px" cellpadding="0" cellspacing="0"> <tr> <td align="right" width="333px" height="40px"> <asp:Label ID="Label2" runat="server" Text="*" CssClass="style2"></asp:Label> <b>&nbsp;<span class="style4"> </span> </b> <span class="style6"><strong>Subject </strong></span><b><span class="style4">:</span> </b> </td> <td align="center" height="40px" class="style3"> &nbsp;&nbsp; <asp:TextBox runat="server" ID="txtSubject" Width="200px" class="textbox" />
  • 36.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 26 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSubject" ErrorMessage="Required FIeld" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator1"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" height="40px"> &nbsp; </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b>&nbsp; <span class="style5">Description :</span> </b> </td> <td align="center" height="40px" class="style3"> <asp:TextBox runat="server" ID="txtDescription" Width="200px" class="textbox" /> </td> <td align="left" width="333px" height="40px"> </td> </tr> <tr> <td align="right" width="333px" height="40px"> </td> <td align="center" height="40px" class="style3"> <asp:Button ID="btnSave" runat="server" Text="Save" Width="100px" OnClick="btnSave_Click" ValidationGroup="A" CssClass="myButton" /> &nbsp;&nbsp; <asp:Button ID="btnClear" runat="server" Text="Clear" Width="100px" OnClick="btnClear_Click" CssClass="myButton" /> </td> <td align="left" width="333px" height="40px"> </td> </tr> </table> <br /> <br /> <div align="center"> <asp:GridView ID="gridSubjects" runat="server" AutoGenerateColumns="false" Width="40%"> <Columns> <asp:BoundField DataField="Id" HeaderText="Id" Visible="false" /> <asp:BoundField DataField="SubjectName" HeaderText="Subject" /> <asp:BoundField DataField="Description" HeaderText="Description" /> <asp:TemplateField HeaderText="Edit / Delete"> <ItemTemplate> <asp:ImageButton ID="linkEdit" CommandArgument='<%#Eval("Id") %>' runat="server" ImageUrl="~/Images/pencil.gif" ToolTip="Edit" Height="20px" Width="20px" OnClick="linkEdit_Click" /> |
  • 37.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 27 <asp:ImageButton ID="linkDelete" CommandArgument='<%#Eval("Id") %>' OnClientClick="return confirm('Do you want to delete the record..?');" runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete" Height="20px" Width="20px" Text="Edit" OnClick="linkDelete_Click" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </div> </asp:Panel> </asp:Content> AdminHome.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <div> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <table width="100%"> <tr align="center"> <td class="auto-style4" align="center"> <asp:Label ID="Label2" runat="server" Font-Bold="True" Font- Size="Large" Text="Welcome Admin To Green Exam" ForeColor="#666633"></asp:Label><br /> <br /> </td> </tr><tr align="center"> <td align="center"> &nbsp; </td> </tr></table> </asp:Panel> </div> </asp:Content> AdminMaster.Master <body style="width: 1170px; margin-left: 76px;"> <form id="form1" runat="server"> <div style="margin-left: 16px"> <table> <tr> <td class="style1"> <asp:Panel ID="Panel1" runat="server" Height="100px" Style="margin-top: 8px" Width="1132px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label1" runat="server" Text="Welcome Admin To Green Exam " Font-Bold="False" Font-Names="Script MT Bold" Font-Size="40pt" ForeColor="#99CC00" Height="100px" Width="958px" Style="margin-left: 18px"></asp:Label> </asp:Panel> &nbsp; </td> </tr> <tr> <td class="style1"> <asp:HyperLink ID="HyperLink1" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="122px" NavigateUrl="~/AdminHome.aspx" Font-
  • 38.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 28 Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home</asp: HyperLink> &nbsp;<asp:HyperLink ID="HyperLink2" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="210px" NavigateUrl="~/AddSubject.aspx" Font-Underline="False">&nbsp;&nbsp;Add Subject</asp:HyperLink> &nbsp;<asp:HyperLink ID="HyperLink5" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="271px" NavigateUrl="~/AddQuestion.aspx" Font-Overline="False">&nbsp;&nbsp;&nbsp;&nbsp;Add Question</asp:HyperLink> &nbsp;<asp:HyperLink ID="HyperLink4" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="271px" NavigateUrl="~/ExamResults.aspx" Font-Overline="False">&nbsp;&nbsp;&nbsp;&nbsp;Exam Results</asp:HyperLink> &nbsp;<asp:HyperLink ID="HyperLink3" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="164px" NavigateUrl="~/ShowUserInfo.aspx" Font-Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User Info</asp:HyperLink> <br /> <br /> </td> </tr> <tr> <td align="right"> <asp:LinkButton Text="Logout" ID="linkLogout" runat="server" OnClick="linkLogout_Click" /> </td> </tr> </table> </div> <table> <tr> <td class="auto-style3"> &nbsp; </td> <td> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder></td> <td class="auto- style3"> &nbsp; </td> </tr> </table> </form> </body> Certificate.aspx <body> <form id="form1" runat="server"> <br /> <asp:HyperLink ID="HyperLink1" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="122px" NavigateUrl="~/Home.aspx" Font-Underline="False" style="margin-left: 21px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home</asp:HyperLink> <div id="PrintOuter" style="vertical-align: middle;" align="center"> <br /> <br /> <asp:Panel ID="Panel1" runat="server" BorderColor="Yellow" BorderStyle="Solid" BorderWidth="10px" Style="margin-left: 136px" Width="789px">
  • 39.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 29 <br /> <table style="height: 607px; width: 740px; margin- left: 23px" frame="void"> <tr> <td class="style4" align="center"> <asp:Label ID="Label1" runat="server" Font- Bold="True" Font-Italic="False" Font-Names="Elephant" Font-Sze="50pt" Text="GreenExam.com"></asp:Label> </td> </tr> <tr> <td class="style1" align="center"> <asp:Label ID="Label2" runat="server" Text="This is to Certify that" Font-Bold="True" Font-Names="Batang" Font-Size="XX- Large"></asp:Label> </td> </tr> <tr> <td class="style2" align="center"> <asp:Label ID="lblUserName" runat="server" Font-Bold="True" Font-Italic="False" Font-Names="AR DECODE" Font-Size="XX- Large"></asp:Label> </td> </tr> <tr> <td class="style3" align="center"> <asp:Label ID="Label4" runat="server" Text="has secured" Font- Bold="True" Font-Names="Batang" Font-Size="XX- Large"></asp:Label> </td> </tr> <tr> <td align="center"> <asp:Label ID="lblMarksObtained" runat="server" Font-Size="XX-Large"></asp:Label> &nbsp;&nbsp;<asp:Label ID="Label6" runat="server" Font- Bold="True" Font-Names="Batang" Font-Size="XX-Large" Text="marks"></asp:Label> &nbsp;&nbsp;<asp:Label ID="Label7" runat="server" Font- Bold="True" Font-Names="Batang" Font-Size="XX-Large" Text="out of"></asp:Label> &nbsp; <asp:Label ID="Label8" runat="server" Text="10" Font- Size="XX-Large"></asp:Label> </td> </tr> </table> </asp:Panel> <br /> </div> <div align="center"> <asp:Button ID="btnPrint" runat="server" Text="Print" OnClientClick="javascript:printPartOfPage('PrintOuter');" Width="100px" CssClass="all_btn1" /> <br /> </div> </form> </body> Exam.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <asp:ScriptManager runat="server" ID="src" /> <asp:UpdatePanel runat="server" ID="UpdatePanel1"> <ContentTemplate> <div align="center"> <span class="style2"><strong>Welcome :</strong></span> <asp:Label Text="" ID="lblUserName" runat="server" Style="font- weight: 700; font-size: large" /> </div> <br /> <div>
  • 40.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 30 <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" width="50%"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label7" runat="server" Text="Question No "></asp:Label> &nbsp;<asp:Label ID="lblQno" runat="server" Text="" /> &nbsp; <asp:Label ID="Label6" runat="server" Text="Of 10"></asp:Label> </td> <td align="right" width="50%"> <asp:Timer ID="Timer1" runat="server" Interval="500" OnTick="Timer1_Tick"> </asp:Timer> <asp:Label ID="lblTimer" runat="server" Font- Bold="True"></asp:Label> </td> </tr> </table> </div> </ContentTemplate> </asp:UpdatePanel> <br /> <div align="left"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="20%" class="style3"> &nbsp; </td> <td class="style3"> <asp:Label ID="lblQuestion" runat="server" Text="" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="radOptions" ErrorMessage="Select your option." Style="color: #FF0000" ValidationGroup="A">Select your option.</asp:RequiredFieldValidator> </td> <td class="style3" width="20%"> &nbsp; </td> </tr> <tr> <td width="20%"> &nbsp; </td> <td> <asp:RadioButtonList ID="radOptions" runat="server"> </asp:RadioButtonList> </td> <td width="20%"> &nbsp; </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="33.33%"> </td> <td width="33.33%"> <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit"Width="116px" CssClass="myButton" ValidationGroup="A" />&nbsp;&nbsp; <asp:Button ID="btnSkip" runat="server" ext="Skip" Width="100px" OnClick="btnSkip_Click" CssClass="myButton" /> </td> <td width="33.33%">&nbsp; </td> </tr> </table> </div> <br /> <br /> </asp:Panel> </asp:Content> ExamResults.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <br /> <br /><div align="center"> <asp:GridView ID="gridUser" runat="server" AutoGenerateColumns="false" Width="100%">
  • 41.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 31 <Columns><asp:BoundField DataField="Id" HeaderText="Id" Visible="false" /><asp:BoundField DataField="Name" HeaderText="Name" /><asp:BoundField DataField="SubjectName" HeaderText="Subject" /><asp:BoundField DataField="ObtainedMarks" HeaderText="Obtained Marks" /> <asp:BoundField DataField="ExamDate" HeaderText="Exam Date" /><asp:TemplateField HeaderText="Delete"> <ItemTemplate> <asp:ImageButton ID="linkDelete" CommandArgument='<%#Eval("Id") %>' OnClientClick="return confirm('Do you want to delete the record..?');" runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete" Height="20px" Width="20px" Text="Edit" OnClick="linkDelete_Click" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </div> </asp:Panel> </asp:Content> Home.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <div><asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl= "~/Images/HomBack.jpg"> <table width="100%"> <tralign="center"> <td class="auto-style4" align="center"> <asp:Label ID="Label2" runat="server" Font-Bold="True" Font- Size="Large" Text="How to apply :" ForeColor="#666633"></asp:Label> <br /> <br /> <asp:Label ID="Label3" runat="server" Font-Size="X-Large" Text="* For new registration click on 'New Registration'." ForeColor="#666633"></asp:Label> <br /> <br /> <asp:Label ID="Label4" runat="server" Font- Size="X-Large" Text="* If you are old user then click on the 'Online Exams' " ForeColor="#666633"> </asp:Label> <br /> <br /> <asp:Label ID="Label5" runat="server" Font-Size="X-Large" Text="* To receive your scores click on 'Results'" ForeColor="#666633"></asp:Label> <br /> <br /> </td> </tr> <tr align="center"> <td align="center"><asp:Image ID="Image1" runat="server" Height="214px" ImageUrl="~/Images/SavePaperSaveEarth.jpg" Style="margin-right: 8px; margin-top: 0px; margin-left: 61px;" Width="651px" ImageAlign="Middle" /> </td> </tr> </table> </asp:Panel> </div></asp:Content> Instructions.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:ScriptManager runat="server" ID="scr" /> <div>
  • 42.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 32 <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="50%" align="Right"> <asp:Label ID="Label5" runat="server" Font-Size="X-Large" Text="Select Subject :" ForeColor="#666633"></asp:Label></td> <td align="left" width="50%"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList ID="ddlSubject" runat="server" Width="200px" CssClass="dropDown"> <asp:ListItem Value="0">-- Select -- </asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlSubject" ErrorMessage="Required Field" InitialValue="0" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator1"> </asp:ValidatorCalloutExtender> </td> </tr> </table> <table width="100%"><tr align="center"> <td class="auto- style4" align="center"> <asp:Label ID="Label2" runat="server" Font-Bold="True" Font- Size="Large" Text="Instructions" ForeColor="#666633"> </asp:Label><br /> <br /> <asp:Label ID="Label3" runat="server" Font-Size="X-Large" Text="* 1 . Do Not Refresh / Reload the Page While Answering!" ForeColor="#666633"></asp:Label> <br /> <br /> <asp:Label ID="Label4" runat="server" Font-Size="X-Large" Text="* 2 .Submit Each Questions after answering them!" ForeColor="#666633"></asp:Label> <br /> <br /> <asp:Label ID="Label6" runat="server" Font-Size="X-Large" Text="* 2 .Do Not Press BackSpace While Answering.!" ForeColor="#666633"></asp:Label> <br /> <br /> </td> </tr> <tr align="center"> <td align="center"> <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="All The Best..!" ForeColor="#666633"></asp:Label> </td> </tr> <tr align="center"> <td align="center"> <asp:Button Text="Start Exam" ID="btnStartExam" runat="server" OnClick="btnStartExam_Click" ValidationGroup="A" CssClass="myButton" /> </td> </tr> </table> </asp:Panel> </div> </asp:Content>
  • 43.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 33 Login.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:ScriptManager runat="server" ID="scr" /> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <br /> <br /> <div align="center"> <table border="0" width="500px" cellpadding="0" cellspacing="0"> <tr><td></td><td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label7" runat="server" Font-Bold="True" Font- Italic="False" Font-Names="Script MT Bold" Font-Size="X-Large" ForeColor="#336600" Text="Admin Login"></asp:Label> </td><td></td></tr> <tr> <td align="right" width="333px" height="40px"> <asp:Label ID="Label2" runat="server" Text="*" Style="color: #FF0000"></asp:Label> <b>&nbsp; Username : </b> </td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtUserName" Width="200px" CssClass="textbox" /> </td> <td align="left" width="333px" height="40px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserName" ErrorMessage="Required Field" ForeColor="Red" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator1"> </asp:ValidatorCalloutExtender></td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label3" runat="server" Text="*" Style="color: #FF0000"></asp:Label>&nbsp; Password : </b></td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtPassword" Width="200px" CssClass="textbox"TextMode="Password" /></td> <td align="left" width="333px" height="40px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword"
  • 44.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 34 ErrorMessage="Required Field" ForeColor="Red" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator2_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator2"> </asp:ValidatorCalloutExtender> </td> </tr> <tr><td align="right" width="333px" height="40px"> </td> <td align="center" width="333px" height="40px"> <asp:Button ID="btnLogin" runat="server" Text="Login" Width="100px" OnClick="btnLogin_Click" ValidationGroup="A" CssClass="myButton" /> &nbsp;&nbsp; <asp:Button ID="btnClear" runat="server" Text="Clear" Width="100px" OnClick="btnClear_Click" CssClass="myButton" /> </td> <td align="left" width="333px" height="40px"> </td> </tr> </table> </div> <br /> <br /></asp:Panel></asp:Content> Master.Master <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Master.master.cs" Inherits="GreenExam.Master" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> <style type="text/css"> .auto-style3 { width: 52px; height: 76px; } .style1 { width: 1140px; } </style> </head> <body style="width: 1170px; margin-left: 76px;"> <form id="form1" runat="server"> <div style="margin-left: 16px"> <table> <tr> <td class="style1"> <asp:Panel ID="Panel1" runat="server" Height="100px" Style="margin-top: 8px" Width="1132px">
  • 45.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 35 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp; <asp:Label ID="Label1" runat="server" Text="&nbsp;&nbsp;Welcome To Green Exam " Font-Bold="False" Font-Names="Script MT Bold" Font-Size="60pt" ForeColor="#99CC00" Height="120px" Width="958px" Style="margin-left: 18px"></asp:Label> </asp:Panel> &nbsp; </td> </tr> <tr> <td class="style1"> <asp:HyperLink ID="HyperLink1" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="122px" NavigateUrl="~/Home.aspx" Font- Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home</asp: HyperLink> &nbsp;<asp:HyperLink ID="HyperLink2" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="210px" NavigateUrl="~/OnlineExam.aspx" Font-Underline="False">&nbsp;&nbsp;Online Exams</asp:HyperLink> &nbsp;<asp:HyperLink ID="HyperLink5" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="271px" NavigateUrl="~/NewRegistration.aspx" Font-Overline="False">&nbsp;&nbsp;&nbsp;&nbsp;New Registration</asp:HyperLink> &nbsp;<asp:HyperLink ID="HyperLink3" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="164px" NavigateUrl="~/UserResults.aspx" Font- Underline="False">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Results</asp: HyperLink> &nbsp;<asp:HyperLink ID="HyperLink6" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="157px" NavigateUrl="~/Login.aspx" Font-Underline="False">Admin Login</asp:HyperLink> &nbsp;<asp:HyperLink ID="HyperLink4" runat="server" BackColor="#669900" Font-Size="X-Large" ForeColor="White" Height="35px" Width="140px" NavigateUrl="~/AboutUs.aspx" Font- Underline="False">&nbsp;&nbsp;About Us</asp:HyperLink> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br /> <br /> </td> </tr> </table> </div> <table> <tr> <td class="uto-style3"> &nbsp; </td> <td>
  • 46.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 36 <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </td> <td class="auto-style3"> &nbsp; </td> </tr> </table> </form> </body> </html> NewRegistration.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:ScriptManager runat="server" ID="src" /> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <br /> <br /> <table border="0" width="1000px" cellpadding="0" cellspacing="0"> <tr><td></td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp; <asp:Label ID="Label7" runat="server" Font-Bold="True" Font- Italic="False" Font-Names="Script MT Bold" Font-Size="X-Large" ForeColor="#336600"Text="Registration Form"></asp:Label> <br /> </td> <td></td></tr> <tr> <td align="right" width="333px" height="40px"> <asp:Label ID="Label2" runat="server" Text="*" CssClass="style2"></asp:Label> <b>&nbsp; Name : </b></td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtName" Width="200px" CssClass="textbox" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator2_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator2"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" height="40px"> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label3" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; Email Id : </b> </td> <td align="center" width="333px" height="40px"> &nbsp;&nbsp; <asp:TextBox runat="server" ID="txtEmailId" Width="200px" CssClass="textbox" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmailId"
  • 47.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 37 ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator3_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator3"> </asp:ValidatorCalloutExtender> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmailId" ErrorMessage="Email Id Not Valid." style="color: #FF0000" ValidationExpression="w+([- +.']w+)*@w+([-.]w+)*.w+([-.]w+)*" ValidationGroup="A">*</asp:RegularExpressionValidator> <asp:ValidatorCalloutExtender ID="RegularExpressionValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RegularExpressionValidator1"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" height="40px"> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label4" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; Mobile No : </b> </td> <td align="center" width="333px" height="40px"> &nbsp;&nbsp; <asp:TextBox runat="server" ID="txtMobileNo" Width="200px" CssClass="textbox" MaxLength="10" /> <asp:FilteredTextBoxExtender ID="txtMobileNo_FilteredTextBoxExtender" runat="server" Enabled="True" TargetControlID="txtMobileNo" FilterType="Numbers" ValidChars="0123456789"> </asp:FilteredTextBoxExtender> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtMobileNo" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator4_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator4"> </asp:ValidatorCalloutExtender> <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtMobileNo" ErrorMessage="Mobile No. not valid. Plesase enter 10 digits." style="color: #FF0000" ValidationExpression="^[0-9]{10}$" ValidationGroup="A">*</asp:RegularExpressionValidator> <asp:ValidatorCalloutExtender ID="RegularExpressionValidator3_ValidatorCalloutExtender"
  • 48.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 38 runat="server" Enabled="True" TargetControlID="RegularExpressionValidator3"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" height="40px"> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label5" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; User Name : </b> </td> <td align="center" width="333px" height="40px"> &nbsp;&nbsp; <asp:TextBox runat="server" ID="txtUserName" Width="200px" CssClass="textbox" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtUserName" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator5_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator5"> </asp:ValidatorCalloutExtender> <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtUserName" ErrorMessage="Minimum 5 and maximum 10 charactors." style="color: #FF0000" ValidationExpression="^[sS]{5,10}$" ValidationGroup="A">*</asp:RegularExpressionValidator> <asp:ValidatorCalloutExtender ID="RegularExpressionValidator4_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RegularExpressionValidator4"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" height="40px"> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label6" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp; Password : </b> </td> <td align="center" width="333px" height="40px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox runat="server" ID="txtPassword" Width="200px" CssClass="textbox" TextMode="Password" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A" ControlToValidate="txtPassword">*</asp:RequiredFieldValidator>
  • 49.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 39 <asp:ValidatorCalloutExtender ID="RequiredFieldValidator6_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator6"> </asp:ValidatorCalloutExtender> <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtConfirmPassword" ControlToValidate="txtPassword" ErrorMessage="Password don't match" Style="color: #FF0000" ValidationGroup="A">*</asp:CompareValidator> <asp:ValidatorCalloutExtender ID="CompareValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="CompareValidator1"> </asp:ValidatorCalloutExtender> <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtPassword" ErrorMessage="Minimum 5 and maximum 10 charactors." style="color: #FF0000" ValidationExpression="^[sS]{5,10}$" ValidationGroup="A">*</asp:RegularExpressionValidator> <asp:ValidatorCalloutExtender ID="RegularExpressionValidator5_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RegularExpressionValidator5"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" height="40px"> </td> </tr> <tr> <td align="right" width="333px" class="style3"> <b> <asp:Label ID="Label1" runat="server" Text="*" CssClass="style2"></asp:Label> &nbsp;Confirm Password : </b> </td> <td align="center" width="333px" class="style3"> <asp:TextBox runat="server" ID="txtConfirmPassword" Width="200px"CssClass="textbox" TextMode="Password" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Required Field" Style="color: #FF0000" ValidationGroup="A" ControlToValidate="txtConfirmPassword">*</asp:RequiredFieldVali dator><asp:ValidatorCalloutExtender ID="RequiredFieldValidator7_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator7"> </asp:ValidatorCalloutExtender> </td> <td align="left" width="333px" class="style3"> </td> </tr> <tr> <td align="right" width="333px" height="40px"> </td> <td align="center" width="333px" height="40px">
  • 50.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 40 <asp:Button ID="btnSave" runat="server" Text="Save" Width="100px" OnClick="btnSave_Click" ValidationGroup="A" CssClass="myButton" /> &nbsp;&nbsp; <asp:Button ID="btnClear" runat="server" Text="Clear" Width="100px" OnClick="btnClear_Click" CssClass="myButton" /> </td> <td align="left" width="333px" height="40px"> </td> </tr> </table><br /> <br /></asp:Panel></asp:Content> OnlineExam.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:ScriptManager runat="server" ID="scr" /> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <br /> <br /> <div align="center"> <table border="0" width="500px" cellpadding="0" cellspacing="0"> <tr> <td align="right" width="333px" height="40px"> <asp:Label ID="Label2" runat="server" Text="*" Style="color: #FF0000"></asp:Label> <b>&nbsp; Username : </b> </td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtUserName" Width="200px" CssClass="textbox" /></td> <td align="left" width="333px" height="40px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserName" ErrorMessage="Required Field" ForeColor="Red" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator1"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label3" runat="server" Text="*" Style="color: #FF0000"></asp:Label>&nbsp; Password : </b> </td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtPassword" Width="200px" CssClass="textbox"TextMode="Password" /> </td> <td align="left" width="333px" height="40px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword" ErrorMessage="Required Field" ForeColor="Red" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator2_ValidatorCalloutExtender"
  • 51.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 41 runat="server" Enabled="True" TargetControlID="RequiredFieldValidator2"> </asp:ValidatorCalloutExtender></td> </tr> <tr> <td align="right" width="333px" height="40px"> </td> <td align="center" width="333px" height="40px"> <asp:Button ID="btnLogin" runat="server" Text="Login" Width="100px" OnClick="btnLogin_Click" ValidationGroup="A" CssClass="myButton" /> &nbsp;&nbsp; <asp:Button ID="btnClear" runat="server" Text="Clear" Width="100px" OnClick="btnClear_Click" CssClass="myButton" /> </td> <td align="left" width="333px" height="40px"> </td> </tr> </table> </div> <br /> <br /> </asp:Panel> </asp:Content> ShowUserInfo.aspx <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"><br /> <br /><div align="center"><asp:GridView ID="gridUser" runat="server" AutoGenerateColumns="False" Width="100%"><Columns><asp:BoundField DataField="Id" HeaderText="Id" Visible="false" /><asp:BoundField DataField="Name" HeaderText="Name" /><asp:BoundField DataField="MobileNo" HeaderText="Mobile No" /> <asp:BoundField DataField="EmilId" HeaderText="Email Id" /> <asp:BoundField DataField="UserName" HeaderText="UserName" /><asp:BoundField DataField="Password" HeaderText="Password" /><asp:TemplateField HeaderText="Delete"> <ItemTemplate><asp:ImageButton ID="linkDelete" CommandArgument='<%#Eval("Id") %>' OnClientClick="return confirm('Do you want to delete the record..?');" runat="server" ImageUrl="~/Images/delete.jpg" ToolTip="Delete" Height="20pxWidth="20px" Text="Edit" nClick="linkDelete_Click" /></ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView></div> </asp:Panel> </asp:Content> UserResult: <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:ScriptManager runat="server" ID="scr" /> <asp:Panel ID="Panel2" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg">
  • 52.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 42 <br /> <br /> <div align="center"><table border="0" width="500px" cellpadding="0" cellspacing="0"> <tr><td></td><td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label7" runat="server" Font-Bold="True" Font- Italic="False"Font-Names="Script MT Bold" Font-Size="X-Large" ForeColor="#336600"Text="Results"></asp:Label> </td><td></td></tr> <tr> <td align="right" width="333px" height="40px"> <asp:Label ID="Label2" runat="server" Text="*" Style="color: #FF0000"></asp:Label><b>&nbsp; Username : </b> </td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtUserName" Width="200px" CssClass="textbox" /> </td> <td align="left" width="333px" height="40px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserName" ErrorMessage="Required Field" ForeColor="Red" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator1_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator1"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" width="333px" height="40px"> <b> <asp:Label ID="Label3" runat="server" Text="*" Style="color: #FF0000"></asp:Label> &nbsp; Password : </b> </td> <td align="center" width="333px" height="40px"> <asp:TextBox runat="server" ID="txtPassword" Width="200px" CssClass="textbox" TextMode="Password" /> </td> <td align="left" width="333px" height="40px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword" ErrorMessage="Required Field" ForeColor="Red" ValidationGroup="A">*</asp:RequiredFieldValidator> <asp:ValidatorCalloutExtender ID="RequiredFieldValidator2_ValidatorCalloutExtender" runat="server" Enabled="True" TargetControlID="RequiredFieldValidator2"> </asp:ValidatorCalloutExtender> </td> </tr> <tr> <td align="right" height="40px" width="333px"> </td> <td align="center" height="40px" width="333px"> <asp:Button ID="btnShowResult" runat="server" OnClick="btnShowResult_Click" Text="Show Result" ValidationGroup="A" Width="100px" CssClass="myButton" />
  • 53.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 43 &nbsp;&nbsp; <asp:Button ID="btnClear" runat="server" Text="Clear" Width="100px" CssClass="myButton" /> </td> <td align="left" height="40px" width="333px"> </td> </tr> </table> </div> </asp:Panel> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFF99" Style="margin-left: 32px" Width="927px" BackImageUrl="~/Images/HomBack.jpg"> <div align="center"> <asp:GridView ID="gridUser" runat="server" AutoGenerateColumns="false" Width="100%"> <Columns> <asp:BoundField DataField="Id" HeaderText="Id" Visible="false" /> <asp:BoundField DataField="Name" HeaderText="Name" /> <asp:BoundField DataField="SubjectName" HeaderText="Subject" /> <asp:BoundField DataField="ObtainedMarks" HeaderText="Obtained Marks" /> <asp:BoundField DataField="ExamDate" HeaderText="Exam Date" /> </Columns> </asp:GridView> </div> </asp:Panel> </asp:Content> Web.Config: <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionStrings> <add name="GreenExamConnectionString" connectionString="Data Source=USERSQLEXPRESS;Initial Catalog=GreenExamDB;Integrated Security=True"/> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, publicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilatio n> </system.web> </configuration> View Code:
  • 54.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 44 AddQuestion.aspx.cs 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; namespace GreenExam { public partial class AddQuestion : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlDataAdapter ad = null; SqlCommand cmd = null; SqlDataReader reader; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillDDLSubject(); FillGrid(); }} private void FillGrid() { try { DataSet ds = new DataSet(); ad = new SqlDataAdapter("Select QuestionMaster.Id as Id, SubjectMaster.SubjectName as Subject, Question, Option1, Option2, Option3, Option4, Answer from QuestionMaster,SubjectMaster where QuestionMaster.SubjectId = SubjectMaster.Id", con); ad.Fill(ds); gridQuestions.DataSource = ds; gridQuestions.DataBind(); } catch (Exception) { Clear(); }
  • 55.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 45 } private void FillDDLSubject() { try { con.Open(); cmd = new SqlCommand("Select Id,SubjectName from SubjectMaster", con); reader = cmd.ExecuteReader(); while (reader.Read()) { ddlSubject.Items.Add(new ListItem(reader[1].ToString(), reader[0].ToString())); } reader.Close(); con.Close(); } catch (Exception ex) { throw ex; } } protected void linkEdit_Click(object sender, EventArgs e) { ImageButton link = (ImageButton)sender; int id = Convert.ToInt32(link.CommandArgument); try { con.Open(); cmd = new SqlCommand("Select Id, SubjectId, Question, Option1, Option2, Option3, Option4, Answer from QuestionMaster where Id =" + id + "", con); reader = cmd.ExecuteReader(); while (reader.Read()) { HiddenField1.Value = Convert.ToString(reader["Id"]); ddlSubject.SelectedValue = Convert.ToString(reader["SubjectId"]); txtQuestion.Text = Convert.ToString(reader["Question"]); txtOption1.Text = Convert.ToString(reader["Option1"]); txtOption2.Text = Convert.ToString(reader["Option2"]); txtOption3.Text = Convert.ToString(reader["Option3"]); txtOption4.Text = Convert.ToString(reader["Option4"]); ddlAnswer.SelectedValue = Convert.ToString(reader["Answer"]); } btnSave.Text = "Update"; } catch (Exception)
  • 56.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 46 { Clear(); } finally { reader.Close(); con.Close(); }} // <<=========To Delete SUBJECT ================>> // protected void linkDelete_Click(object sender, EventArgs e) { ImageButton link = (ImageButton)sender; int id = Convert.ToInt32(link.CommandArgument); try { con.Open(); cmd = new SqlCommand("Delete from QuestionMaster where Id = @Id", con); cmd.Parameters.AddWithValue("@Id", id); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Question has been deleted successfully.');", true); Clear(); FillGrid(); } catch (Exception) { Clear(); } FillGrid(); } protected void btnSave_Click(object sender, EventArgs e) { try { if (btnSave.Text == "Save") { con.Open(); cmd = new SqlCommand("Insert into QuestionMaster (SubjectId, Question, Option1, Option2, Option3, Option4, Answer) values (@SubjectId, @Question, @Option1, @Option2, @Option3, @Option4, @Answer)", con); cmd.Parameters.AddWithValue("@SubjectId", ddlSubject.SelectedValue); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@Option1", txtOption1.Text); cmd.Parameters.AddWithValue("@Option2", txtOption2.Text);
  • 57.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 47 cmd.Parameters.AddWithValue("@Option3", txtOption3.Text); cmd.Parameters.AddWithValue("@Option4", txtOption4.Text); cmd.Parameters.AddWithValue("@Answer", ddlAnswer.SelectedValue); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Question has been inserted successfully.');", true); } else if (btnSave.Text == "Update") { con.Open(); cmd = new SqlCommand("Update QuestionMaster set SubjectId=@SubjectId, Question=@Question, Option1=@Option1, Option2=@Option2, Option3=@Option3, Option4=@Option4, Answer=@Answer where Id=@Id", con); cmd.Parameters.AddWithValue("@SubjectId", ddlSubject.SelectedValue); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@Option1", txtOption1.Text); cmd.Parameters.AddWithValue("@Option2", txtOption2.Text); cmd.Parameters.AddWithValue("@Option3", txtOption3.Text); cmd.Parameters.AddWithValue("@Option4", txtOption4.Text); cmd.Parameters.AddWithValue("@Answer", ddlAnswer.Text); cmd.Parameters.AddWithValue("@Id", HiddenField1.Value); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Question has been updated successfully.');", true); } Clear(); FillGrid(); } catch (Exception) { Clear(); }} protected void btnClear_Click(object sender, EventArgs e) { Clear(); } private void Clear() { ddlAnswer.SelectedIndex = 0; ddlSubject.SelectedIndex = 0; txtOption1.Text = null; txtOption2.Text = null; txtOption3.Text = null;
  • 58.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 48 txtOption4.Text = null; txtQuestion.Text = null; btnSave.Text = "Save"; txtQuestion.Focus(); }}} AddSubject.aspx.cs 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; namespace GreenExam { public partial class AddSubject : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlDataAdapter ad = null; SqlCommand cmd = null; SqlDataReader reader; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillGrid(); } } private void FillGrid() { try { DataSet ds = new DataSet(); ad = new SqlDataAdapter("Select * from SubjectMaster", con); ad.Fill(ds); gridSubjects.DataSource = ds; gridSubjects.DataBind(); } catch (Exception) {
  • 59.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 49 Clear(); } } protected void linkEdit_Click(object sender, EventArgs e) { ImageButton link = (ImageButton)sender; int id = Convert.ToInt32(link.CommandArgument); try { con.Open(); cmd = new SqlCommand("Select Id,SubjectName,Description from SubjectMaster where Id=" + id + "", con); reader = cmd.ExecuteReader(); while (reader.Read()) { HiddenField1.Value = Convert.ToString(reader["Id"]); txtSubject.Text = Convert.ToString(reader["SubjectName"]); txtDescription.Text = Convert.ToString(reader["Description"]); } btnSave.Text = "Update"; } catch (Exception) { Clear(); } finally { reader.Close(); con.Close(); } } // <<========== To Delete sUBJECT ===========>> // protected void linkDelete_Click(object sender, EventArgs e) { ImageButton link = (ImageButton)sender; int id = Convert.ToInt32(link.CommandArgument); try { con.Open(); cmd = new SqlCommand("Delete from SubjectMaster where Id = @Id", con); cmd.Parameters.AddWithValue("@Id", id); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Subject has been deleted successfully.');", true);
  • 60.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 50 Clear(); FillGrid(); } catch (Exception) { Clear(); } FillGrid(); } protected void btnSave_Click(object sender, EventArgs e) { try { if (btnSave.Text == "Save") { con.Open(); cmd = new SqlCommand("Insert into SubjectMaster (SubjectName,Description) VALUES (@SubjectName,@Description)", con); cmd.Parameters.AddWithValue("@SubjectName", txtSubject.Text); cmd.Parameters.AddWithValue("@Description", txtDescription.Text); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Subject has been inserted successfully.');", true); } else if (btnSave.Text == "Update") { con.Open(); cmd = new SqlCommand("Update SubjectMaster set SubjectName = @SubjectName,Description = @Description where Id = @Id", con); cmd.Parameters.AddWithValue("@SubjectName", txtSubject.Text); cmd.Parameters.AddWithValue("@Description", txtDescription.Text); cmd.Parameters.AddWithValue("@Id", HiddenField1.Value); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Subject has been updated successfully.');", true); } Clear(); FillGrid(); } catch (Exception) { Clear(); } }
  • 61.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 51 protected void btnClear_Click(object sender, EventArgs e) { Clear(); } private void Clear() { txtDescription.Text = null; txtSubject.Text = null; btnSave.Text = "Save"; txtSubject.Focus(); } } } AdminHome.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace GreenExam { public partial class AdminHome : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { }}} AdminMaster.Master.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace GreenExam { public partial class AdminMaster : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) {
  • 62.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 52 } protected void linkLogout_Click(object sender, EventArgs e) { Response.Redirect("Home.aspx"); }}} Certificate.aspx.cs 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; namespace GreenExam { public partial class Certificate : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlCommand cmd = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["UserId"] != null) { try { con.Open(); cmd = new SqlCommand("Select Name from Registration where Id=" + Convert.ToInt32(Session["UserId"]) + "", con); string name = Convert.ToString(cmd.ExecuteScalar()); con.Close(); lblUserName.Text = name; if (Session["optainedMarks"] != null) { lblMarksObtained.Text = Session["optainedMarks"].ToString(); } } catch (Exception) {
  • 63.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 53 }}}}}} Exam.aspx.cs 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; namespace GreenExam { public partial class Exam : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlCommand cmd = null; SqlDataReader reader = null; #region [Global Variables] int min, sec; string min1, sec1; int subjectId; #endregion protected void Page_Load(object sender, EventArgs e) { if (Session["min"] != null && Session["sec"] != null && Session["Subject"] != null) { min = (int)Session["min"]; sec = (int)Session["sec"]; subjectId = Convert.ToInt32(Session["Subject"]); if (sec <= 9) sec1 = "0" + sec; else sec1 = "" + sec; if (min <= 9) min1 = "0" + min; else min1 = "" + min; lblTimer.Text = "" + min1 + ":" + sec1;
  • 64.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 54 } if (lblTimer.Text == "00:01") { InsertUserInfo(); Response.Redirect("Certificate.aspx"); } if (!IsPostBack) { try { con.Open(); cmd = new SqlCommand("Select Name from Registration where Id=" + Convert.ToInt32(Session["UserId"]) + "", con); string name = Convert.ToString(cmd.ExecuteScalar()); con.Close(); lblUserName.Text = name; } catch (Exception) { } Session["optainedMarks"] = 0; lblQno.Text = "1"; GenerateQuestion(); } } private void GenerateQuestion() { try { radOptions.Items.Clear(); con.Open(); cmd = new SqlCommand("Select top 1 * from QuestionMaster where SubjectId=" + subjectId + " order by NEWID()", con); reader = cmd.ExecuteReader(); while (reader.Read()) { lblQuestion.Text = reader["Question"].ToString(); radOptions.Items.Add(new ListItem(reader["Option1"].ToString(), "Option1")); radOptions.Items.Add(new ListItem(reader["Option2"].ToString(), "Option2")); radOptions.Items.Add(new ListItem(reader["Option3"].ToString(), "Option3")); radOptions.Items.Add(new ListItem(reader["Option4"].ToString(), "Option4"));
  • 65.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 55 Session["CorrectAns"] = reader["Answer"].ToString(); } reader.Close(); con.Close(); } catch (Exception) { } } private void InsertUserInfo() { try { con.Open(); cmd = new SqlCommand("Insert into Results (SubjectId, UserId, ObtainedMarks,ExamDate) values (@SubjectId, @UserId, @ObtainedMarks,@ExamDate)", con); cmd.Parameters.AddWithValue("@SubjectId", subjectId); cmd.Parameters.AddWithValue("@UserId", Convert.ToInt32(Session["UserId"])); cmd.Parameters.AddWithValue("@ObtainedMarks", Convert.ToInt32(Session["optainedMarks"])); cmd.Parameters.AddWithValue("@ExamDate", Convert.ToDateTime(DateTime.Now.ToShortDateString())); cmd.ExecuteNonQuery(); con.Close(); } catch (Exception) { }} protected void Timer1_Tick(object sender, EventArgs e) { if (sec == 0) { min = min - 1; sec = 59; } Session["min"] = min; Session["sec"] = sec; System.Threading.Thread.Sleep(500); if (sec <= 9) sec1 = "0" + sec; else sec1 = "" + sec; if (min <= 9)
  • 66.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 56 min1 = "0" + min; else min1 = "" + min; lblTimer.Text = "" + min1 + ":" + sec1; sec = sec - 1; Session["min"] = min; Session["sec"] = sec; } protected void btnSubmit_Click(object sender, EventArgs e) { try { if (radOptions.SelectedValue.ToString().Equals(Convert.ToString(Sessi on["CorrectAns"]))) { Session["optainedMarks"] = Convert.ToInt32(Session["optainedMarks"]) + 1; } if (lblQno.Text == "10") { InsertUserInfo(); Response.Redirect("Certificate.aspx"); } GenerateQuestion(); int qno = Convert.ToInt32(lblQno.Text); int questionNo = qno + 1; lblQno.Text = Convert.ToString(questionNo); } catch (Exception) { } } protected void btnSkip_Click(object sender, EventArgs e) { if (lblQno.Text == "10") { InsertUserInfo(); Response.Redirect("Certificate.aspx"); } GenerateQuestion(); int qno = Convert.ToInt32(lblQno.Text); int questionNo = qno + 1;
  • 67.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 57 lblQno.Text = Convert.ToString(questionNo); }}} ExamResults.aspx.cs 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; namespace GreenExam { public partial class ExamResults : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlDataAdapter ad = null; SqlCommand cmd = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillGrid(); }} private void FillGrid() { try { DataSet ds = new DataSet(); ad = new SqlDataAdapter("Select Results.Id as Id,Name,SubjectName,ObtainedMarks,ExamDate from Results,SubjectMaster,Registration where Results.SubjectId=SubjectMaster.Id and Results.UserId=Registration.Id", con); ad.Fill(ds); gridUser.DataSource = ds; gridUser.DataBind(); } catch (Exception) { }
  • 68.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 58 } protected void linkDelete_Click(object sender, EventArgs e) { ImageButton link = (ImageButton)sender; int id = Convert.ToInt32(link.CommandArgument); try { con.Open(); cmd = new SqlCommand("Delete from Results where Id = @Id", con); cmd.Parameters.AddWithValue("@Id", id); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('Result has been deleted successfully.');", true); FillGrid(); } catch (Exception) { } FillGrid(); }}} Instructions.aspx.cs 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; namespace GreenExam { public partial class Instructions : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlDataAdapter ad = null; SqlCommand cmd = null; SqlDataReader reader; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) {
  • 69.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 59 FillDDLSubject(); } } private void FillDDLSubject() { try { con.Open(); cmd = new SqlCommand("Select Id,SubjectName from SubjectMaster", con); reader = cmd.ExecuteReader(); while (reader.Read()) { ddlSubject.Items.Add(new ListItem(reader[1].ToString(), reader[0].ToString())); } reader.Close(); con.Close(); } catch (Exception ex) { throw ex; }} protected void btnStartExam_Click(object sender, EventArgs e) { Session["min"] = 10; Session["sec"] = 0; Session["Subject"] = ddlSubject.SelectedValue; Response.Redirect("Exam.aspx"); }}} Login.aspx.cs 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; namespace GreenExam { public partial class Login : System.Web.UI.Page {
  • 70.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 60 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlCommand cmd = null; protected void Page_Load(object sender, EventArgs e) { } protected void btnLogin_Click(object sender, EventArgs e) { try { con.Open(); cmd = new SqlCommand("Select count(Id) from AdminLogin where UserName = @UserName and Password = @Password", con); cmd.Parameters.AddWithValue("@UserName", txtUserName.Text); cmd.Parameters.AddWithValue("@Password", txtPassword.Text); int count = Convert.ToInt32(cmd.ExecuteScalar()); con.Close(); if (count > 0) { Response.Redirect("AdminHome.aspx"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('User name or Password does not exist.');", true); txtPassword.Text = null; } } catch (Exception) { Clear(); } } protected void btnClear_Click(object sender, EventArgs e) { Clear(); } private void Clear() { txtPassword.Text = null; txtUserName.Text = null; }}} Master.Master.cs using System; using System.Collections.Generic;
  • 71.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 61 using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace GreenExam { public partial class Master : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { }}} NewRegistration.aspx.cs 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; namespace GreenExam { public partial class NewRegistration : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlCommand cmd = null; protected void Page_Load(object sender, EventArgs e) { } protected void btnSave_Click(object sender, EventArgs e) { try { con.Open(); cmd = new SqlCommand("Insert into Registration (Name, MobileNo, EmilId, UserName, Password) VALUES (@Name, @MobileNo, @EmilId, @UserName, @Password)", con); cmd.Parameters.AddWithValue("@Name", txtName.Text); cmd.Parameters.AddWithValue("@MobileNo", txtMobileNo.Text);
  • 72.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 62 cmd.Parameters.AddWithValue("@EmilId", txtEmailId.Text); cmd.Parameters.AddWithValue("@UserName", txtUserName.Text); cmd.Parameters.AddWithValue("@Password", txtPassword.Text); cmd.ExecuteNonQuery(); con.Close(); Response.Redirect("OnlineExam.aspx"); } catch (Exception) { Clear(); } } protected void btnClear_Click(object sender, EventArgs e) { Clear(); } private void Clear() { txtConfirmPassword.Text = null; txtEmailId.Text = null; txtMobileNo.Text = null; txtName.Text = null; txtPassword.Text = null; txtUserName.Text = null; }}} OnlineExam.aspx.cs 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; namespace GreenExam { public partial class OnlineExam : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlCommand cmd = null; SqlDataReader reader = null; protected void Page_Load(object sender, EventArgs e) {
  • 73.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 63 } protected void btnClear_Click(object sender, EventArgs e) { Clear(); } private void Clear() { txtPassword.Text = null; txtUserName.Text = null; } protected void btnLogin_Click(object sender, EventArgs e) { try { con.Open(); cmd = new SqlCommand("Select Id,UserName,Password from Registration where UserName = @UserName and Password = @Password", con); cmd.Parameters.AddWithValue("@UserName", txtUserName.Text); cmd.Parameters.AddWithValue("@Password", txtPassword.Text); reader = cmd.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { Session["UserId"] = reader["Id"].ToString(); Response.Redirect("Instructions.aspx"); }}} catch (Exception) { Clear(); } finally { reader.Close(); con.Close(); }}}} ShowUserInfo.aspx.cs 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;
  • 74.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 64 namespace GreenExam { public partial class ShowUserInfo : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlDataAdapter ad = null; SqlCommand cmd = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillGrid(); } } private void FillGrid() { try { DataSet ds = new DataSet(); ad = new SqlDataAdapter("Select * from Registration", con); ad.Fill(ds); gridUser.DataSource = ds; gridUser.DataBind(); } catch (Exception) { } } protected void linkDelete_Click(object sender, EventArgs e) { ImageButton link = (ImageButton)sender; int id = Convert.ToInt32(link.CommandArgument); try { con.Open(); cmd = new SqlCommand("Delete from Registration where Id = @Id", con); cmd.Parameters.AddWithValue("@Id", id); cmd.ExecuteNonQuery(); con.Close(); ScriptManager.RegisterStartupScript(this, GetType(), "abc", "alert('User has been deleted successfully.');", true); FillGrid(); } catch (Exception) {
  • 75.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 65 } FillGrid(); } } } UserResults.aspx.cs 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; namespace GreenExam { public partial class UserResults : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["GreenExa mConnectionString"].ConnectionString); SqlCommand cmd = null; SqlDataAdapter ad = null; SqlDataReader reader = null; protected void Page_Load(object sender, EventArgs e) { } private void Clear() { txtPassword.Text = null; txtUserName.Text = null; } private void FillGrid() { try { DataSet ds = new DataSet(); ad = new SqlDataAdapter("Select Results.Id as Id,Name,SubjectName,ObtainedMarks,ExamDate from Results,SubjectMaster,Registration where Results.SubjectId=SubjectMaster.Id and Results.UserId=Registration.Id and Results.UserId=" + Convert.ToInt32(Session["Id"]) + "", con); ad.Fill(ds); gridUser.DataSource = ds; gridUser.DataBind();
  • 76.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 66 5.2 Testing Approach During the development of new system, the testing of the system which is currently being developed is more important for successful implementation of the project. At the time of system development we did a testing by two ways, first unit wise and then system wise. The development process involves various types of testing. Each test type addresses a specific testing requirement. 5.2.1 Unit Testing At the initial level for development of the “Green Exam” (i.e. Online Examination System) the first testing is done at Unit Level (i.e. testing is performed on small parts) therefore it is called as Unit Testing. This testing is done to find the errors occurred during the establishing of the project. In this testing the source code of the system is processed into a module, which turns into a small part called as Units. These units have specific behaviours and testing taking place on these units is called Unit Testing. Due to this atomic level testing it is also referred as White Box testing. The Unit Testing is done to the basis of the language used in the project. In our system the C# (i.e. C-Sharp) language is used, on which the unit testing is performed. Unit test ensure that each unique path of the project perform accurately to the documented specification and contain clearly defined input and expected result. In our system we does the unit testing in followings ways • We test that each module is working properly or not. • The testing of each text field has taken the proper values and are they stored into database files.
  • 77.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 67 The testing of an individual module is done at the runtime and find that there are not any errors occurred. 5.2.2 Integrated Testing Integration testing is the process of validating proper functionality between two or more components. Some developers may use different definitions of a "component", so first one should determine the type of integration being performed. The most common use of the concept of integration testing is directly after unit testing. All units are developed and they will be tested individually by itself during unit test, and then they are integrated with surrounding (i.e. other associated parts/units) units in the program. Integration testing could also be described as the validation of multiple programs in an application/website, in an organisation, multiple applications/ website in an organisations/private institutes, or multiple companies in a network. 5.2.3 System Testing The project “Green Exam” (i.e. Online Examination System) is developed by using several modules. There are several modules constitute in the project. Once all the modules are integrated by connecting them, the several errors can be occurred during the execution of the developed system therefore at this moment the testing of the system under development phase must be done. After integration of all the modules in the current system are must get tested therefore it is called as System Testing. It is a testing which tests the whole system after the completion and integration of each module. The system testing ensures the entire integration of the module gives specific software/website. System testing of software or hardware is testing conducted on a complete, integrated system to evaluate the system’s compliance with the specified requirement. Due to testing occurred on external perspective of the test object to drive test cases it be referred as Black box testing. System Testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic.
  • 78.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 68 5.3 Implementation and Maintenance Implementation phase involves the practical usage of the system/product that we created yet. In this phase the client for which the system is developed can use/handle the system. Maintenance phase involves correcting some mistakes if occoured/making modifications if required. Generally developers build the system which fulfil all the requirements of the clients. Sometimes it may happen that even client also unale to collect/acquire the information about all the requirements. In such cases the solution is that after completion of project upgradations can be done which is nothing but the maintenance. After implementation the webite looks as follows: Home page:
  • 79.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 69 Online Exam: New Registration:
  • 80.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 70 Results: Admin login:
  • 81.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 71 Admin Loged in: Add Subject:
  • 82.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 72 Exam Results: Add Question:
  • 83.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 73 User Info: After User Login and Subject Selection:
  • 84.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 74 Exam Started: At The end of exam:
  • 85.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 75 Wrong Answered questions: Certificate is generated:
  • 86.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 76 When user clicks on Print button:
  • 87.
  • 88.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 77 6. CONCLUSION 6.1 Limitations of the System • Green Exam is nothing but same as online examination therefore without internet it is impossible to conduct the exams. • It requires a lot of electronic resources like CPU, Monitor, Keyboard, etc. • Therefore it consumes a lot of electricity. • Due to manual test exams user may be unable to understand the personal computers therefore he/she must have knowledge and experience of using the PCs. • The organization where these examinations will be conducted must have the generator/inverter in case of sudden blackout/power off. 6.2 Conclusion This project offers an Online Examination services to the user. These services efficient for exam conduction for multiple users with proper security within particular time with the help of timer supported by this system. This enhances overall reliability and availability of the services while simultaneously ensuring server farm accessibility. In this project we use latest technology like .NET. Finally we want to state that, our project has provided an efficient examination conducting services using fast processing and consequently speeds up the performance. This gives the fastest output to the user which is our goal also it give printed output to user. By this project, we can improve our exam system. This project is need of today’s era. This project is best alternative for objective type of exam in each and every sector like Govt. sector, private sector, and corporate sector. Also this is need of today’s fastest era.
  • 89.
    GREEN EXAM M.Sc. Final(Computer Science) Sem-IV Page 78 6.3 Future Scope of the Project Today’s era is computers and mobile era. When the development increases, no one people have time. Also mobile network is becoming large network & provides the facility of internet. Today’s technology is 2G.After sometime 3G is all over the world. . 3G provides the facility for the heavy use of internet on mobiles. Due to this system we reduce hardware, software & power supply cost is reduced. So, In future, we have to convert this project into mobile based examination system. By converting this project to mobile based examination system, we can give the test or examination on mobile. Due to mobile lot of time of examinee, time required for arrangement of exam is also saved. By using this on mobile, we increase flexibility of online examination systems. This project also uses in Govt. sector exams that require more time to conduct exams. Time Reducing is main power of this project. Project should become popular in activities like campus recruitment, exams of Govt. sector, private sector etc.
  • 90.
  • 91.
    7. BIBLIOGRAPHY 1) TheComplete Reference ASP.NET by MacDonald (TMH). 2) Programming with Microsoft ASP.NET 3.5 by Dino Esposito, Microsoft Press. 3) Microsoft ASP.NET Step by Step (Microsoft Press) - G. Andrew Duthrie 4) Debugging ASP.NET (New Riders) - Jonathon Goodyear, Brian Peek, Brad Fox. 5) Deploying and Managing Microsoft .NET Web Farms (Sams) - Barry Bloom. 6) http://www.codeproject.com/webservices/articlerss.aspx 7) http://www.delphibasics.co.uk/Net.html 8) http://www.search.com/reference/.net_framework 9) www.dotnetfunda.com/articles/article1419-weak-references-in- net-.aspx For More Seminars and Projects Google/refer following Recommended Links:- 1) Pritambhansali.blogspot.com 2) Edumeet. blogspot.com 3) SlideShare.com/pritambhansali 4) Scribd.com/pritambhansali 5) Youtube.com/TechEduTV