Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
169 views153 pages

Kishan Project Report

onlineExam

Uploaded by

krishnan iyer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views153 pages

Kishan Project Report

onlineExam

Uploaded by

krishnan iyer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 153

ONLINE EXAMINATION SYSTEM

BY

Kishan Kumar Jaiswal


Roll No: 270504

Department of Information & Technology


Microtek Institute of Information Technology
Maldahiya, Varanasi (U.P)
May, 2017

Makhanlal Chaturvedi Rashtriya Patrakarita


Vishwavidyalaya, Bhopal
MAJOR/ MINOR PROJECT REPORT

ON

ONLINE EXAMINATION SYSTEM


SUBMITTED IN PARTIAL FULFILLMENT FOR AWARD OF DEGREE
IN

BACHELOR OF COMPUTER APPLICATION


(BATCH 2014-2017)
BY

Kishan Kumar Jaiswal


Roll No: 270504
UNDER THE ESTEEMED GUIDANCE OF

MR. RAJ KUMAR SINGH


Department Of Information & Technology
Microtek Institute of Information Technology
Maldahiya, Varanasi (U.P)
MAY, 2017

Makhanlal Chaturvedi Rashtriya Patrakarita


Vishwavidyalaya, Bhopal
Index

Table of Contents

Certificate of Originality ............................................................................................................................... 5


Acknowledgement ........................................................................................................................................ 6
Introduction/Aims ......................................................................................................................................... 7
Objectives ..................................................................................................................................................... 8
System Analysis……………………………………………………………………………………………………………………………….…….9

Feasibility Study ......................................................................................................................................... 10


Analysis ...................................................................................................................................................... 11
 DFD (Data flow Diagram) ............................................................................................................. 11
 ER Diagram ................................................................................................................................... 18
 Table structure ............................................................................................................................... 19
S/W & H/W Requirement Specification ..................................................................................................... 20
System Design- Screen Shots ..................................................................................................................... 21
Coding ......................................................................................................................................................... 36
Implementation and Maintenance ............................................................................................................. 147
Testing (Testing Techniques and Testing Strategies) ............................................................................... 149
Various Types of Reports/Modules .......................................................................................................... 151
Future Scope of the Project ....................................................................................................................... 152
Conclusion ................................................................................................................................................ 153
Bibliography/References........................................................................................................................... 153
MAKHANLAL CHATURVEDI NATIONAL UNIVERSITY OF JOURNALISM &
COMMUNICATION, BHOPAL

Project Work Evaluation

1. Candidates Roll No………………………….Name………………..……….………………


E-mail……………….……………………………………………………………………………...
2. Project Title: ………………………………………………………………………………..
3. Software Base: ……………………………………………………………………………..
4. Sponsoring Institute Address: ……………………………………………………...
5. Submitted for Course & Year: …………………………………….…………………
6. Study Center Code, Name, Address: …………………..…………………………
7. Total Internal assessment and exam work evaluation…………… Marks out of……..
Details of evaluation along with name and sign of teacher:
Particulars Mark out of Marks Awarded Internal Examiner’s
Name & Signature

8. Forwarding by Head of Study Center: ……………………………………….……………..


(Signature, Name & Study Centre Seal)…………………………………..……………………..
9. Remarks of Study center: …………………….………………………..…………………………………
10. University Project Examiner’s Evaluation
Total Marks awarded………………………………out of …………………………………..
Details Evaluation along with name & sign of University Examiner:

Particulars Mark out of Marks Awarded External Examiner’s


Name & Signature

1. Remarks of University Examiner: …………………………………………………………………….


Certificate of Originality

I hereby declare that the Project entitled “ONLINE EXAMINATION SYSTEM”


submitted to the Department of Information Technology, Microtek Institution of Information
Technology Maldahiya, and Varanasi (U.P) in partial fulfillment for the award of the Degree of
BACHELOR IN COMPUTER APPLICATION in session 2014-2017 is an authentic record of my own
work carried out under the guidance of Dr./Ms./Mr. Raj Kumar Singh And that the Project has
not previously formed the basis for the award of any other degree.

Place:
Date: Kishan Kumar Jaiswal
Roll No: 270504

This is to certify that the above statement made by the candidate is correct to the best of
my knowledge.

1. Signature of Internal guide 2. Signature of External Guide


Name Name
Designation Designation
Acknowledgement

I am very grateful to my project guide Dr. /Ms. /Mr. Raj Kumar Singh for giving his valuable
time and constructive guidance in preparing the Synopsis/Project. It would not have been
possible to complete this project in short period of time without his kind encouragement and
valuable guidance.

Date: Signature

Kishan Kumar Jaiswal


Roll No: 270504
Introduction/Aims

Online Exams is being launched because a need for a destination that is beneficial for both
institutes and students. With this site, institutes can register and host online exams. Students can
give exams and view their results. This site is an attempt to remove the existing flaws in the
manual system of conducting exams.

Purpose
Online Exams System fulfills the requirements of the institutes to conduct the exams online
they do not have to go to any software developer to make a separate site for being able to
conduct exams online. They just have to register on the site and enter the exam details and the
lists of the students which can appear in the exam. Students can give exam without the need of
going to any physical destination. They can view the result at the same time. Thus the purpose of
the site is to provide a system that saves the efforts and time of both the institutes and the
students.
Objectives

 To make the application of Online Examination System, usable for the Institutes.
 The purpose of the project is to provide online facility to Institutes to conduct online
exams and to Students to give online exams.
 Institutes can enter and edit the questions along with the students list.
 Online Exams System is a web application that establishes a network between the
institutes and the students.
 Providing services to the institutes and providing them with an option of selecting the
eligible students by themselves.
 Reduces the manual work, maintaining accuracy, increasing
efficiency and saving time.
System Analysis
Planning information system is very important because of following facts:

i) Information is now recognized as a vital resource and must be managed. It is equal in


importance to cash, physical facilities and personnel.
ii) More and more financial resources are spent on information system. Top level
management is paying more attention to develop information system.
iii) There is a need for long term planning for information system. The objective is to
develop major systems and reduce the number of smaller systems.
Proper planning for information system ensures that the role played by the system will be
according to need of organization.

The first step in the system development life cycle is initial investigation. Ties phase begins as
soon as a request is initiated to modify the current computerized system or to computerize the
current manual system. In this phase the present system is studied to get in-depth knowledge of
the system to know why the change is required.
Feasibility Study
Once scope has been identified (with the concurrence of the customer), it is
reasonable to ask: “Can we build software to meet this scope? Is the project
feasible?” All too often, software engineers rush past this questions (or are
pushed past them by impatient managers or customers), only to become
mired in a project that is doomed from the onset. When we are developing the system (software),
we must know the proposed system will be feasible or i.e. practically implemented or not it may
possible the proposed( candidate ) system may not implemented due to many reasons
like it may take long time in development than the specified time limit ,cost
may increase than proposed one etc. Therefore we must analyze the
feasibility of the system. Feasibility is the analysis of risks, costs & benefits relating to
economics, technology & user operation .There are several types of feasibility depending on the
aspect they covers. Some important feasibility is as follows:-

(I) Technical Feasibility


(II) Operational Feasibility
(III) Economical Feasibility
Technical Feasibility
The technically feasibility study basically centers on alternatives for hardware, software and
design approach to determine the functional aspects of system. This project on Online
Examination will be platform in dependent since it is being coded in C# language (using
Javascripts).ASP is used to create web pages.MS-SQL SERVER database will be used for
storing data. Hardware requirements used are compatible with all O.S. Only authorized
person would be able to use the website so it would be secure. The system
can also be expanded as per the needs of requirement specification.

Operational Feasibility
Operational Feasibility is a measure of how people are able to work with
system. This type of feasibility demands if the system will work when
developed and installed. Since website is very user friendly so users will find it comfortable to
work on this site.
Economical Feasibility
Economic analysis is the most frequently used evaluating the effectiveness
of proposed system, more commonly known as Benefit analysis. The Benefit
analysis is to determine benefits and savings which are expected from
candidate system and compare them with cost. If the benefits are more than
the cost, then decision is made to design and implement the system. The cost
and benefits may be direct or indirect and tangible or intangible.
Analysis

 DFD(Data flow Diagram)


 ER Diagrams
 Database Designs

DFD (Data flow Diagram)

Data Flow Diagram


A Data Flow Diagram (DFD) is a diagram that describes the flow of data and the processes that
change or transform data throughout a system. The Data Flow Diagram reviews the current
physical system, prepares input and output specification, specifies the implementation plan etc.

Four basic symbols are used to construct data flow diagrams. They are symbols that represent
data source, data flows, and data transformations and data storage. The points at which data are
transformed are represented by enclosed figures, usually circles, which are called nodes.

Data Flow Diagram Symbols:

Source or Destination of Data

Data Flow

Process
Storage

DATA FLOW: - The data flow is used to describe the movement of


information from one part of the system to another part. Flows represent data in
motion. It is a pipe line through which information flows. Data flow is represented by an arrow.

Data Flow

PROCESS: - A circle or bubble represents a process that transforms


incoming data to outgoing data. Process shows a part of the system that
transforms inputs to outputs.

Process

EXTERNAL ENTITY: - A square defines a source or destination of


system data. External entities represent any entity that supplies or
receive information from the system but is not a part of the system

External Entity

DATA STORE: -The data store represents a logical file. A logical file can
represent either a data store symbol which can represent either a data
structure or a physical file on disk. The data store is used to collect data at rest or a temporary
repository of data. It is represented by open rectangle.

Data Store
Steps to Construct Data Flow Diagrams:
Four steps are commonly used to construct a DFD

 Process should be named and numbered for easy reference. Each name should be
representative of the process.
 The direction of flow is from top to bottom and from left to right.
 When a process is exploded into lower level details they are numbered.
 The names of data stores, sources and destinations are written in capital letters.

Rules for constructing a Data Flow Diagram:

 Arrows should not cross each other.


 Squares, Circles and files must bear names.
 Decomposed data flow squares and circles can have same names.
 Choose meaningful names for dataflow.

Draw all data flows around the outside of the diagram


Level ‘0’ DFD for ONLINE EXAMINATION

INSTITUTE RECORDS

ADMINISTRATOR

STUDENTS RECORDS
INSTITUTE

EXAMINATION

STUDENT TEST RECORDS


LEVEL ‘1’ DFD

INSTITUTE
Question Paper

REGISTER
Institute Profile

Showing
Records

ADMINISTRATOR

Students Records

GIVE
EXAM

Test Results

STUDENTS
Displaying
Results
LEVEL ‘2’ DFD FOR STUDENTS

STUDENTS
STUDENT
PROFILE
LOGIN

ADMINISTRAT
OR

AUTHE
MARKS
NTICAT
E CALCULATION

TIME LIMIT

INVALID USER EXAM


GIVE

QUESTIONS

MARKS
STATEMENT
TAKE EXAM
LEVEL ‘2’ DFD FOR INSTITUTES

INSTITUTE
INSTITU
TE
REGISTR
ATION
INSTITUTE PROFILE

EXAM DETAILS
ADMINISTRATOR

STUDENT DETAILS
INSTITUTE

LOGIN

USE
INSTITUTE DETAILS
View Records

MARKS STATEMENT

VIEW

TEST

RECORD
S SEE STUDENT WISE

DISPLAY OF TEST
RESULTS OF
ER Diagram

Manage

Manage
Handles

Manage
Table structure

1. Registration Table

Field Data Type Constraints Description


Login ID Integer(10) Primary Key Store Institute Id
Login Name Varchar(20) Not Null Store Login Name
Email Varchar(50) Not Null Store Email Id
Password Varchar(20) Not Null Store Password
Institute Name Varchar(30) Not Null Store Institute Name
Contact No Bigint Not Null Store Contact Number

2. Institute Exam Details Table

Field Data Type Constraints Description


Subject Name Varchar(30) Not Null Store Subject Name
Question ID Bigint Not Null Store Question ID
Question Varchar(200) Not Null Store Question
Option A Varchar(50) Not Null Store Option A
Option_B Varchar(50) Not Null Store Option B
Option_C Varchar(50) Not Null Store Option C
Option_D Varchar(50) Not Null Store Option D
Answer Varchar(50) Not Null Store Answer
Institute_Name Varchar(50) Not Null Store Institute Name

3. Institute Student List


Field Data Type Constraints Description
Sid Bigint Primary key Store Student id
Sname Varchar(30) Not Null Store Student Name
Email_ID Varchar(20) Not Null Store Exam Given
Contact No Integer(5) Not Null Store Exam Marks
Gender Varchar(10) Not Null Store Gender
Address Varchar(100) Not Null Store Address
Nationality Varchar(30) Not Null Store Nationality
Institute_Name Varchar(30) Not Null Store Institute_Name
Exam Given Varchar(30) Not Null Store Exam Given type
4. Student Test Result

Fields Data Type Constraints Description


Student ID Bigint Primary key Stores Student ID
Student Name Varchar(80) Not Null Stores Student Name
Institute Name Varchar(30) Not Null Stores Institute_Name
Exam Given Varchar(20) Not Null Stores Exam Given
Attempted Question Varchar(3) Not Null Stores Attempted Question
Unattempted_Question Varchar(3) Not Null Stores Unattempted_Question
Result Varchar(10) Not Null Stores Result
Marks Obtained Bigint Not Null Stores Marks Obtained
Total Marks Bigint Not Null Stores Total Marks

S/W & H/W Requirement Specification

HARDWARE REQUIREMENT:

 1.54 MHz or Above


 512MB RAM
 40 GB hard disk
 Support for printer for printing results
 Screen resolution of at least 800X600 is
required
 Optical Mouse
SOFTWARE REQUIREMENT

 Any Windows based Operating System


 IDE (Visual Studio 12.0) for developing project
 IIS(Internet Information service) Server
 Front End : ASP.Net ,CSS, C#, JavaScript
 Back End : MS SQL Server
System Design- Screen Shots
\
Coding

Home.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"


CodeBehind="Home.aspx.cs" Inherits="OnlineWeb.WebForm6" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style4
{
width: 100%;
}
.style8

.auto-style6
{
width: 100%;
}
.auto-style7
{
text-align: center;
}

.auto-style8
{
width: 250px;
}
.auto-style9
{
text-align: center;
width: 250px;
}
.style31
{
text-align: justify;
font-size: small;
}

.auto-style10
{
width: 100%;
}

</style>
<script type="text/javascript">

var image1 = new Image()


image1.src = "Banner/Onlineexam.png"
var image2 = new Image()
image2.src = "Images/Help logo.jpg"
var image3 = new Image()
image3.src = "Images/Education-banner.jpg"
var image4 = new Image()
image4.src = "Images/student.png"
var image5 = new Image()
image5.src = "Banner/1.jpg"
var image6 = new Image()
image6.src = "Images/Addimage.jpg"

</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style4">
<tr>
<td colspan="3" >
<img alt="" class="corner" name="img" src="Images/Addimage.jpg"
style="height:270px; width:100%;" />
<script type="text/javascript">
var step = 1
function slideImages() {
if (!document.images)
return
document.images.img.src = eval("image" + step + ".src")
if (step < 15)
step++
else
step = 1
setTimeout("slideImages()", 3000)
}
slideImages()

</script>

</td>
</tr>
<tr>
<td class="style31" colspan="3">
<p>Stop your thinking because Online Examination System is a online
based web application . Online Exams is being launched because a need for a
destination that is beneficial for students. With this site, Students can register and
host online exams . Students can give exams and view their results. This site is an
attempt to remove the existing flaws in the manual system of conducting exams .
Online Exams System is a web application that establishes
a network between the organisations and the students.
This website reduces the manual work, maintaining accuracy, increasing efficiency
and saving time. In Online examination system institute can register to conducta online
test and view the records later. Students can give the test and their respectiverecords,
which include their marks for each test given by them, will be maintained separately. No
student can take a particular exam more than once.</p>
</td>
</tr>
<tr>

<td class="style19" style="width:33%;">


<asp:Panel ID="Panel1" runat="server" style="text-align: center">
<table class="auto-style6">
<tr>
<td style="text-align: left;width:33%;">
<asp:Image ID="Image3" runat="server" Height="250px"
ImageUrl="~/Advertise/ebook.png" Width="225px" />
</td>
</tr>
<tr>
<td style="text-align: center;width:33%;">
&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="LinkButton2"
runat="server" ForeColor="#0033CC" onclick="LinkButton2_Click" ToolTip="Download E-
Books">E-Books</asp:LinkButton>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<td style="text-align: center;width:33%;" >Own Your Future By
Learning
Skills&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
; </td>
</tr>
</table>
</asp:Panel>
</td>
<td class="style19" style="width:33%;">
<table class="auto-style6">
<tr>
<td style="text-align: center;width:33%;" class="auto-style8">
<asp:Image ID="Image4" runat="server" ImageUrl="~/Advertise/student.png"
Height="250px" Width="230px" />
</td>
</tr>
<tr>
<td class="auto-style9" style="text-align: center;width:33%;">
<asp:LinkButton ID="LinkButton3" runat="server"
ToolTip="Grownup Your Potential" onclick="LinkButton3_Click"
ForeColor="#003399">Student</asp:LinkButton>
</td>
</tr>
<tr>
<td class="auto-style9" style="text-align:
center;width:33%;">&nbsp;Transform Your
Potential</td>
</tr>
</table>
</td>
<td class="style19" style="width:33%;">
<table class="auto-style6">
<tr>
<td style="text-align: right;width:33%;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Image ID="Image5" runat="server" ImageUrl="~/Advertise/certify.png"
Height="250px" Width="238px" />
</td>
</tr>
<tr>
<td class="auto-style7" style="text-align: center;width:33%;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;
<asp:LinkButton ID="LinkButton4" runat="server" ToolTip="Download
Certificates"
onclick="LinkButton4_Click"
ForeColor="#003399">Certificates</asp:LinkButton>
</td>
</tr>
<tr>
<td class="auto-style7" style="text-align:
center;width:33%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp; Download</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="style19" colspan="3">
<asp:Panel ID="Panel2" runat="server">
<table class="auto-style10">
<tr>
<td style="text-align: left;width:45%;">
<asp:ImageButton ID="ImageButton2" runat="server"
Height="186px" ImageUrl="~/Images/trendcourse.png" ToolTip="Find Trending Courses"
Width="365px" OnClick="ImageButton2_Click" />
</td>
<td style="width:10%;">&nbsp;</td>
<td style="text-align: right;width:45%;">
<asp:ImageButton ID="ImageButton3" runat="server"
Height="185px" ImageUrl="~/Images/newcourse.png" ToolTip="Find New Courses" Width="365px"
OnClick="ImageButton3_Click" />
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>

Home.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace OnlineWeb
{
public partial class WebForm6 : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)


{

protected void LinkButton2_Click(object sender, EventArgs e)


{
Response.Redirect("DownloadE-Books.aspx");
}

protected void LinkButton3_Click(object sender, EventArgs e)


{
Response.Redirect("Exam.aspx");
}

protected void LinkButton4_Click(object sender, EventArgs e)


{
Response.Redirect("Certificates.aspx");
}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("www.Google.com ");
}

protected void ImageButton3_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("www.Google.com");
}
}
}

Institute.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"


CodeBehind="Institute.aspx.cs" Inherits="OnlineWeb.WebForm7" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">

.auto-style3
{
width: 100%;
}
.auto-style4
{
text-align: right;
}
.auto-style5
{
width: 422px;
text-align: left;
}
.auto-style6
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: large;
color: #FFFFFF;
}
.auto-style7
{
width: 265px;
}
</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div style="width:100%;">

<asp:Image ID="Image2" runat="server" Height="298px"


ImageUrl="~/Images/Education-banner.jpg" Width="100%" />

</div>
<div>
</div>
<div>
<table class="style4">
<tr>
<td colspan="3" style="text-align: center; background-color:
#FF3300; border-radius:100px;" class="auto-style6">
<marquee behavior="alternate"> Hello !
<asp:Label ID="institutelbl" runat="server"
Text="Microtek Institute"></asp:Label></marquee> </td>
</tr>
<tr>
<td colspan="3" ></td>
</tr>
<tr>
<td colspan="3" style="text-align: center; color: #008080; font-
size: medium; font-family: 'Segoe UI';">
<asp:Panel ID="Panel4" runat="server" style="color: #FFFFFF;
background-color: #006666 ; border-radius:100px;">
<table class="style4">
<tr>
<td>
<asp:TextBox ID="TextBox1" runat="server"
Enabled="False" Visible="False"></asp:TextBox>
</td>
<td>
<asp:LinkButton ID="examdt" runat="server"
Font-Bold="True" ForeColor="White" OnClick="examdt_Click">Exam Details</asp:LinkButton>
</td>
<td>
<asp:LinkButton ID="studentdt" runat="server"
Font-Bold="True" ForeColor="White" OnClick="studentdt_Click">Student
Details</asp:LinkButton>
</td>
<td>
<asp:LinkButton ID="viewdt" runat="server"
Font-Bold="True" ForeColor="White" OnClick="viewdt_Click1">View Profile</asp:LinkButton>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"
Enabled="False" Visible="False"></asp:TextBox>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="3" ">
&nbsp;</td>
</tr>
<tr>
<td colspan="3" style="text-align: justify; color: #008080;
font-size: small ; " >
<p>
The purpose of the project is to provide online
facility to Institutes to conduct online exams and to Students to give online exams.
Institutes can enter and edit the questions along with the students list. Also they can
view the result. Students can give their respective exams and view their score then and
there. Others can download Study Material from the online examination system.This website
provides facility to institutes to conduct online exams by providing a unique id to each
institute. The institute provides questions along with Study Materials.Institute also
enters the list of eligible students. All the information entered can be later edited by
the institute.&nbsp;The future versions of the website will be having a better database
to handle larger number of records, in a more secure way. Also separate profile will be
maintained later for all students so that he can view all his previous test
performances.vious test performances.Online Exams System provides the platform but does
not directly participate in, nor is it
involved in any tests conducted. Questions are posted not by the site, but users of the
site. The
site requires an institute to register before posting the questions.</p>
</td>
</tr>
<tr>
<td rowspan="5" class="auto-style7">
<asp:Panel ID="Panel1" runat="server"
Height="231px" Width="270px">
<table class="auto-style3">
<tr>
<td>GIVE FEEDBACK</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>

<td>Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:TextBox ID="nametxt" placeholder="Enter


Your Name" runat="server" Width="180px"></asp:TextBox>
</td>
</tr>
<tr>
<td>Email ID&nbsp;&nbsp;
<asp:TextBox
ID="emailfdtxt" runat="server" placeholder="Enter Your Email ID"
Width="180px"></asp:TextBox>
</td>
</tr>
<tr>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ControlToValidate="emailfdtxt" ErrorMessage="RegularExpressionValidator"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">Enter Correct Email
ID</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>Feedback
<asp:TextBox ID="feedtxt"
runat="server" placeholder="Give us FeedBack" TextMode="MultiLine"
Width="180px"></asp:TextBox>
</td>
</tr>
<tr>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;
<asp:Button
ID="submitbtn" runat="server" Text="Submit" />
&nbsp;</td>
</tr>
</table>
</asp:Panel>
</td>
<td class="auto-style5" rowspan="5">
<asp:Panel ID="Panel5" runat="server" Height="231px">
<table class="auto-style3">
<tr>
<td>
<asp:ImageButton ID="ImageButton1"
runat="server" Height="231px" ImageUrl="~/Advertise/banner3.jpg"
OnClick="ImageButton1_Click" Width="394px" />
</td>
</tr>
</table>

</asp:Panel>
</td>
<td style="text-align: right">
<asp:Image ID="Image3" runat="server" Height="62px"
ImageUrl="~/Banner/fill-email.gif" Width="200px" />
</td>
</tr>
<tr>
<td class="auto-style4">
<asp:TextBox ID="emailidtxt" runat="server" placeholder="Enter EmailID to
get Updates!" Width="189px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style4">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="emailidtxt" ErrorMessage="RegularExpressionValidator"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">Enter Correct Email
ID</asp:RegularExpressionValidator>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
</tr>
<tr>
<td class="auto-style4">
<asp:Button ID="subscribebtn" runat="server" Text="Subscribe"
Width="120px" OnClick="subscribebtn_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">
&nbsp;</td>
</tr>
</table>
</div>
</asp:Content>

Institute.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.Net;
using System.Net.Mail;
namespace OnlineWeb
{
public partial class WebForm7 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["logstat"] != null)
{
Label lbl = this.Master.FindControl("loginuserlbl") as Label;
lbl.Text = Session["logstat"].ToString();
Button btn = this.Master.FindControl("loginmasbtn") as Button;
btn.Text = Session["logoutstat"].ToString();
}
else
{
Response.Redirect("Error.aspx");
}
}

protected void examdt_Click(object sender, EventArgs e)


{
Response.Redirect("ExamDetails.aspx");
}

protected void studentdt_Click(object sender, EventArgs e)


{
Response.Redirect("Student Details.aspx");
}

protected void subscribebtn_Click(object sender, EventArgs e)


{
string message = "Thank You To Subscribe Our Online Examination \n We Get
Back Soon With More Updates";
var smtp = new System.Net.Mail.SmtpClient();
{
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Timeout = 20000;
smtp.Credentials = new NetworkCredential(emailidtxt.Text,message );

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("http://www.Amazon.com");
}

protected void viewdt_Click1(object sender, EventArgs e)


{
Response.Redirect("ViewProfile.aspx");
}
}
}

Exam Details.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"


CodeBehind="ExamDetails.aspx.cs" Inherits="OnlineWeb.WebForm12" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1"


%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div><br/>
</div>
<div>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"
Width="864px">
<cc1:TabPanel runat="server" HeaderText="Add Question" ID="TabPanel1">
<ContentTemplate>
<br /><asp:Panel ID="Panel3" runat="server"
class="panelarea" style="text-align: left; background-color: #339966" Width="850px"
Height="31px">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button6" runat="server"
BorderStyle="None" class="panelarea" Enabled="False" Height="30px" style="font-family:
'Comic Sans MS'; font-weight: 700; color: #FFFFFF; background-color: #FF3300" Text="Add
Questions" Width="104px" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="addedlbl" runat="server"
style="color: #FFFFFF; font-family: 'Courier New', Courier, monospace; font-size:
medium;" Text="Successfully Added" Visible="False"></asp:Label>
</asp:Panel><br/><br/><table
class="style4"><tr><td>Subject Name</td><td><asp:DropDownList ID="snamedropdwn"
runat="server" Width="123px" Height="28px" style="color: #008080; font-family: 'Courier
New', Courier, monospace"><asp:ListItem>C-
Language</asp:ListItem><asp:ListItem>Programming with C++</asp:ListItem>
<asp:ListItem>Programming with Java</asp:ListItem><asp:ListItem>Programming with
C#</asp:ListItem><asp:ListItem>HTML</asp:ListItem><asp:ListItem>PHP</asp:ListItem><asp:Li
stItem>Javascript</asp:ListItem><asp:ListItem>CSS</asp:ListItem><asp:ListItem>SQL
Server</asp:ListItem><asp:ListItem>My SQL</asp:ListItem><asp:ListItem>Operating
System</asp:ListItem><asp:ListItem>Networking</asp:ListItem><asp:ListItem>A/C with
Tally</asp:ListItem><asp:ListItem>Photoshop</asp:ListItem></asp:DropDownList></td></tr><t
r><td>Question ID</td><td><asp:TextBox ID="questionidtxt" runat="server"
TextMode="Number"></asp:TextBox></td></tr>
<tr><td>Question</td><td><asp:TextBox ID="questiontxt" runat="server"
TextMode="MultiLine" Width="300px"></asp:TextBox></td></tr><tr><td>Option
A</td><td><asp:TextBox ID="option_atxt" runat="server" Height="16px" Width="300px"
style="font-family: 'Courier New', Courier,
monospace"></asp:TextBox></td></tr><tr><td>Option B</td><td><asp:TextBox ID="option_btxt"
runat="server" Width="300px" style="font-family: 'Courier New', Courier,
monospace"></asp:TextBox></td></tr><tr><td>Option C</td><td><asp:TextBox ID="option_ctxt"
runat="server" Width="300px" style="font-family: 'Courier New', Courier,
monospace"></asp:TextBox></td></tr><tr><td>Option D</td><td>
<asp:TextBox ID="option_d" runat="server" Width="300px" style="font-family: 'Courier
New', Courier, monospace"></asp:TextBox></td></tr><tr><td>Answer</td><td><asp:TextBox
ID="answertxt" runat="server" Width="300px" style="font-family: 'Courier New', Courier,
monospace"></asp:TextBox></td></tr><tr><td>Institute Name</td><td><asp:TextBox
ID="addinstitutetxt" runat="server" Height="16px" Width="301px" style="font-family:
'Courier New', Courier,
monospace"></asp:TextBox></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;<
/td><td><asp:Button ID="addbtn" runat="server" Height="35px" Text="Add Question"
Width="112px" style="font-weight: 700; color: #0066CC; font-family: 'Comic Sans MS'"
OnClick="addbtn_Click"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table>
</table>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Update">
<ContentTemplate>
<br />
<div><asp:Panel ID="Panel5" runat="server"
class="panelarea" style="text-align: left; background-color: #339966" Height="30px"
Width="850px">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button4" runat="server"
BorderStyle="None" class="panelarea" Enabled="False" Height="28px" style="font-family:
'Comic Sans MS'; font-weight: 700; color: #FFFFFF; background-color: #FF3300"
Text="Update Questions" Width="119px" />
<asp:Label ID="updatemsglbl" runat="server"
style="color: #FFFFFF; font-size: medium; font-family: 'Courier New', Courier, monospace;
font-weight: 700" Text="Question Successfully Updated" Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </asp:Panel>
</div><br />
<table class="style4"><tr><td>Subject
Name</td><td><asp:DropDownList ID="uptsnamedropdwn" runat="server" Width="195px"
Height="28px" style="color: #008080; font-family: 'Courier New', Courier,
monospace"><asp:ListItem>C-Language</asp:ListItem><asp:ListItem>Programming with
C++</asp:ListItem><asp:ListItem>Programming with
Java</asp:ListItem><asp:ListItem>Programming with
C#</asp:ListItem><asp:ListItem>HTML</asp:ListItem><asp:ListItem>PHP</asp:ListItem><asp:Li
stItem>Javascript</asp:ListItem><asp:ListItem>CSS</asp:ListItem><asp:ListItem>SQL
Server</asp:ListItem><asp:ListItem>My SQL</asp:ListItem><asp:ListItem>Operating
System</asp:ListItem>
<asp:ListItem>Networking</asp:ListItem><asp:ListItem>A/C with
Tally</asp:ListItem><asp:ListItem>Photoshop</asp:ListItem></asp:DropDownList></td></tr><t
r><td>Question ID</td><td><asp:TextBox ID="uptquestionidtxt" placeholder="Enter Question
No" runat="server" CssClass="auto-style10"
TextMode="Number"></asp:TextBox></td></tr><tr><td>Question</td><td><asp:TextBox
ID="uptquestiontxt" runat="server" TextMode="MultiLine" Width="300px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>Option A</td><td><asp:TextBox
ID="uptoption_atxt" runat="server" Height="16px" Width="300px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>Option B</td><td>
<asp:TextBox ID="uptoption_btxt" runat="server" Width="300px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>Option C</td><td><asp:TextBox
ID="uptoption_ctxt" runat="server" Width="300px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>Option D</td><td><asp:TextBox ID="uptoption_d"
runat="server" Width="300px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>Answer</td><td><asp:TextBox ID="uptanswertxt"
runat="server" Width="300px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>Institute Name</td><td><asp:TextBox
ID="uptinstitutetxt" runat="server" Height="16px" Width="301px" CssClass="auto-
style10"></asp:TextBox></td></tr><tr><td>&nbsp;</td>
<td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><asp:Button ID="updatebtn" runat="server"
Height="35px" style="font-weight: 700; font-family: 'Comic Sans MS'; color: #006699;"
Text="Update Question" Width="140px" OnClick="updatebtn_Click"
/></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table><br />

</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel3" runat="server"
HeaderText="Search"><ContentTemplate>
<div><asp:Panel ID="Panel4" runat="server" class="panelarea"
style="text-align: left; background-color: #339966" Height="31px" Width="850px">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button5" runat="server"
BorderStyle="None" class="panelarea" Enabled="False" Height="30px" style="font-family:
'Comic Sans MS'; font-weight: 700; color: #FFFFFF; background-color: #FF3300"
Text="Display Question" Width="113px" />
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="msglblsearch" runat="server"
style="color: #FFFFFF; font-size: medium; font-family: 'Courier New', Courier, monospace;
font-weight: 700" Text="No Record Found" Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</asp:Panel></div><br />
<table class="style4"><tr><td style="text-align:
center" class="auto-style5">Select Subject</td><td><asp:DropDownList
ID="searchdrpsubject" runat="server" Height="20px" Width="190px" style="color: #008080;
font-family: 'Courier New', Courier, monospace"><asp:ListItem>C-
Language</asp:ListItem><asp:ListItem>Programming with
C++</asp:ListItem><asp:ListItem>Programming with
Java</asp:ListItem><asp:ListItem>Programming with C#</asp:ListItem>
<asp:ListItem>HTML</asp:ListItem>
<asp:ListItem>PHP</asp:ListItem>
<asp:ListItem>Javascript</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
<asp:ListItem>SQL Server</asp:ListItem>
<asp:ListItem>My SQL</asp:ListItem>
<asp:ListItem>Operating System</asp:ListItem>
<asp:ListItem>Networking</asp:ListItem>
<asp:ListItem>A/C with Tally</asp:ListItem>
<asp:ListItem>Photoshop</asp:ListItem>
</asp:DropDownList>
</td></tr><tr><td class="auto-style5"
style="text-align: center">Enter Institute Name</td><td><asp:TextBox
ID="searchinstitutetxt" placeholder="Enter Institute Name" runat="server" Height="20px"
Width="190px" CssClass="auto-style10"></asp:TextBox>
</td></tr><tr><td class="auto-style5"
style="text-align: center">&nbsp;</td><td><asp:Button ID="searchbtn" runat="server"
OnClick="searchbtn_Click" Text="Submit" Width="88px" CssClass="auto-style10" />
&nbsp;</td></tr><tr><td class="auto-
style3" colspan="2" style="text-align: left">

&nbsp;<asp:Panel ID="Panel8" runat="server"


ScrollBars="Both" Height="213px" Width="837px" >

<asp:GridView ID="GridView1" runat="server"


Height="250px" Width="807px">
</asp:GridView>
</asp:Panel>
</td></tr></table>
</ContentTemplate>

</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel4" runat="server" HeaderText="Remove">
<ContentTemplate>
<div><br /><asp:Panel ID="Panel6" runat="server"
class="panelarea" Height="32px" style="text-align: left; background-color: #339966"
Width="850px">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="deletebtnmsg" runat="server"
BorderStyle="None" class="panelarea" Enabled="False" Height="30px" style="font-family:
'Comic Sans MS'; font-weight: 700; color: #FFFFFF; background-color: #FF3300"
Text="Delete Questions" Width="119px" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="deletemsglbl" runat="server"
style="color: #FFFFFF; font-size: medium; font-family: 'Courier New', Courier, monospace;
font-weight: 700" Text="Question Successfully Deleted" Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</asp:Panel>
<br /><table class="style4"><tr><td class="auto-style8">&nbsp;</td>
<td class="auto-style9">Select Subject</td>
<td> <asp:DropDownList ID="deldrpdwn"
runat="server" Width="127px" Height="20px" style="font-family: 'Courier New', Courier,
monospace; color: #008080">
<asp:ListItem>C-Language</asp:ListItem> <asp:ListItem>Programming with
C++</asp:ListItem><asp:ListItem>Programming with
Java</asp:ListItem><asp:ListItem>Programming with
C#</asp:ListItem><asp:ListItem>HTML</asp:ListItem><asp:ListItem>PHP</asp:ListItem><asp:Li
stItem>Javascript</asp:ListItem><asp:ListItem>CSS</asp:ListItem><asp:ListItem>SQL
Server</asp:ListItem><asp:ListItem>My SQL</asp:ListItem><asp:ListItem>Operating
System</asp:ListItem><asp:ListItem>Networking</asp:ListItem><asp:ListItem>A/C with
Tally</asp:ListItem><asp:ListItem>Photoshop</asp:ListItem></asp:DropDownList></td><td>&nb
sp;</td></tr><tr><td class="auto-style8">&nbsp;</td>
<td class="auto-style9">Enter Question
Number</td>
<td> <asp:TextBox ID="questionnumtxt"
placeholder="Enter Question Number" runat="server" Height="20px" TextMode="Number"
CssClass="auto-style10"></asp:TextBox></td><td>&nbsp;</td></tr><tr><td class="auto-
style8">&nbsp;</td>
<td class="auto-style9">Enter Institute
Name</td>
<td> <asp:TextBox ID="institutenametxt"
placeholder="Enter Institute Name" runat="server" Height="20px" Width="180px"
CssClass="auto-style10"></asp:TextBox></td>
</tr>
<caption>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style9">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style9">&nbsp;</td>
<td>&nbsp;<asp:Button ID="deletebtn"
runat="server" Height="28px" OnClick="deletebtn_Click" Text="Delete" Width="96px"
CssClass="auto-style10" />
</td>
<td>&nbsp;</td>
</tr>
</caption>
</table></div>

</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
</div>
<div></div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
</asp:Content>

Exam Details.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm12 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["logstat"] != null)
{
Label lbl = this.Master.FindControl("loginuserlbl") as Label;
lbl.Text = Session["logstat"].ToString();
Button btn = this.Master.FindControl("loginmasbtn") as Button;
btn.Text = Session["logoutstat"].ToString();
}
else
{
Response.Redirect("Error.aspx");
}

msglblsearch.Visible = false;
deletemsglbl.Visible = false;
addedlbl.Visible = false;
}

protected void addbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "insert into exam_details values('" + snamedropdwn.Text + "','" +
questionidtxt.Text + "','" + questiontxt.Text + "','" + option_atxt.Text + "','" +
option_btxt.Text + "','" + option_ctxt.Text + "','" + option_d.Text + "','" +
answertxt.Text + "','" + addinstitutetxt.Text + "')";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
addedlbl.Visible = true;

con.Close();
}

protected void updatebtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "update exam_details set Question='" + uptquestiontxt.Text +
"',Option_A='" + uptoption_atxt.Text + "',Option_B='" + uptoption_btxt.Text +
"',Option_C='" + uptoption_ctxt.Text + "',Option_D='" + uptoption_d.Text + "',Answer='" +
uptanswertxt.Text + "' where Question_ID='" + uptquestionidtxt.Text + "' and
Institute_Name='" + uptinstitutetxt.Text + "'";

SqlCommand cmd = new SqlCommand(q, con);


int a = cmd.ExecuteNonQuery();
if (a == 1)
{
updatemsglbl.Visible = true;

}
else
{
updatemsglbl.Visible = true;
updatemsglbl.Text = "Question Not Found For Updation ";
}

con.Close();
}

protected void searchbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from exam_details where Subject_Name='" +
searchdrpsubject.Text + "' and Institute_Name='" + searchinstitutetxt.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
msglblsearch.Text = "Displaying Records Of Questions";
msglblsearch.Visible = true;
GridView1.DataSource = dr;
GridView1.DataBind();
dr.Close();
}
else
{
msglblsearch.Visible = true;

}
}

protected void deletebtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "delete exam_details where Subject_Name='" + deldrpdwn.Text +
"'and Question_ID='" + questionnumtxt.Text + "' ";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
deletemsglbl.Visible = true;

}
else
{
deletemsglbl.Text = "Required Question Not Found";
deletemsglbl.Visible = true;
}

}
}
}

Student Details.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="Student Details.aspx.cs" Inherits="OnlineWeb.WebForm2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1"
%>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting"
tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style4
{
width: 100%;
}
.style7
{
height: 160px;
}
.style11
{
height: 30px;
text-align: center;
}
.style12
{
height: 30px;
width: 218px;
}
.style13
{
width: 218px;
}
.style14
{
font-family: "Segoe UI";
color: #333333;
}
.style15
{
text-align: right;
}
.style16
{
height: 30px;
text-align: center;
}
.style17
{
font-family: "Segoe UI";
}
.auto-style1
{
height: 30px;
text-align: center;
}
.auto-style2
{
}
.auto-style3
{
width: 100%;
}
.auto-style7
{
width: 762px;
text-align: right;
}
.auto-style8
{
width: 1101px;
}
.auto-style9
{ text-align: left;
}
.profilebtn
{
/*border-radius:3px;*/
text-align: center;
padding-right: 10px;
font-family: "Segoe UI";

}
.auto-style12
{
text-align: left;
height: 445px;
}
.panelarea
{
border-radius:20px;
}
.auto-style13
{
}
.auto-style14
{
width: 252px;
}
.auto-style21
{
text-align: right;
width: 257px;
}
.auto-style22
{
width: 36px;
}
.auto-style23
{
text-align: left;
}
.auto-style24
{
width: 54px;
}
.auto-style25
{
width: 82px;
text-align: center;
}
.auto-style26
{
text-align: right;
width: 222px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style30
{
width: 379px;
}
.auto-style31
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
width: 161px;
}
.auto-style32
{
text-align: right;
font-family: Verdana, Geneva, Tahoma, sans-serif;
width: 161px;
}
.auto-style33
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style34
{
width: 252px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style35
{
text-align: right;
width: 257px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
</style>
<%--<script type="text/javascript">

var image1 = new Image()


image1.src = "Advertise/banner2.jpg"
var image3 = new Image()
image3.src = "Advertise/banner3.jpg"
var image4 = new Image()
image4.src = "Advertise/banner4.jpg"
var image5 = new Image()
image5.src = "Advertise/banner5.jpg"
var image6 = new Image()
image6.src = "Banner/Flipkart.jpg"
var image7 = new Image()
image7.src = "Images/Education-banner.jpg"
</script>--%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%-- <table class="auto-style3">
<tr>
<td> <img alt="" class="corner" name="img" src="Images/Education-banner.jpg"
style="height:250px; width: 960px;" />
<%-- <script>
var step = 1
function slideImages() {
if (!document.images)
return
document.images.img.src = eval("image" + step + ".src")
if (step < 15)
step++
else
step = 1
setTimeout("slideImages()", 3000)
}
slideImages()

</script>--%><%-- </td>
</tr>

</table>--%>
<div><marquee height="20px" behavior="alternate">WELCOME IN ONLINE EXAMINATION SYSTEM
<asp:Label ID="institutelbl" runat="server" style="text-transform: uppercase;
font-family: 'Segoe UI'" Text="Microtek Institute"></asp:Label></marquee></div>
<table>

<tr><td class="auto-style12" colspan="2">


<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2"
Height="475px" Width="858px" style="background-color: #fff;">
<cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Add Record">
<ContentTemplate>
<br/><asp:Panel ID="Panel3" class="panelarea" runat="server" style="text-align: left;
background-color: #339966">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
&#160;<asp:Button ID="Button1" class="panelarea" runat="server" BorderStyle="None"
Enabled="False" Height="30px" style="font-family: 'Comic Sans MS'; font-weight: 700;
color: #FFFFFF; background-color: #FF3300" Text="Add Record" Width="104px"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="confirmlbl" runat="server" style="color:
#FFFFFF; font-weight: 700; font-family: Verdana, Geneva, Tahoma, sans-serif;"
Text="Successfully Added" Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</asp:Panel><br/><br/><table class="auto-style3"><tr><td style="text-align:
right">Student Name:</td><td style="text-align: center"><asp:TextBox ID="snametxt"
runat="server" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td>&nbsp;</td></tr><tr><td style="text-align:
right">EmailID:</td><td style="text-align: center"><asp:TextBox ID="emailtxt"
runat="server" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td><asp:RegularExpressionValidator
ID="RegularExpressionValidator3" runat="server" ControlToValidate="emailtxt"
ErrorMessage="RegularExpressionValidator" ValidationExpression="\w+([-+.']\w+)*@\w+([-
.]\w+)*\.\w+([-.]\w+)*" CssClass="auto-style28">Enter correct email
id</asp:RegularExpressionValidator></td></tr><tr><td class="style15">Contact No:</td><td
style="text-align: center"><asp:TextBox ID="contacttxt" runat="server" Width="204px"
CssClass="auto-style27"></asp:TextBox></td><td>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator4" runat="server" ControlToValidate="contacttxt"
ErrorMessage="RegularExpressionValidator" ValidationExpression="[0-9]{10}"
CssClass="auto-style28">Enter Correct Contact
number</asp:RegularExpressionValidator></td></tr><tr><td class="style15">Gender</td>
<td style="text-align: center"> <asp:RadioButton ID="malerbtn"
runat="server" GroupName="gender" Text="Male" CssClass="auto-style27"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:RadioButton ID="femalerbtn"
runat="server" GroupName="gender" Text="Female" CssClass="auto-
style27"/></td><td>&nbsp;</td></tr><tr><td class="style15">Address</td><td style="text-
align: center"><asp:TextBox ID="addresstxt" runat="server" TextMode="MultiLine"
Width="204px" CssClass="auto-style27"></asp:TextBox></td><td>
&nbsp;</td></tr><tr><td class="style15">Nationality</td><td
style="text-align:
left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList ID="nationalitydrp"
runat="server" Height="20px" Width="127px" CssClass="auto-
style27"><asp:ListItem>Indian</asp:ListItem><asp:ListItem>Others</asp:ListItem></asp:Drop
DownList></td><td>&nbsp;</td></tr><tr><td style="text-align: right">Institute
Name:</td><td style="text-align: center"><asp:TextBox ID="institutestxt" runat="server"
Width="204px" CssClass="auto-style27"></asp:TextBox></td><td>&nbsp;</td></tr><tr><td
style="text-align: right">Exam Give</td><td style="text-align: center"><asp:TextBox
ID="examgivetxt" placeholder="Enter Subject Code for given exam " runat="server"
Width="204px" CssClass="auto-style27"></asp:TextBox>
</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td style="text-
align: center"><asp:Button ID="addbtn" runat="server" Text="Submit"
OnClick="addbtn_Click" style="font-weight: 700; font-family: Verdana, Geneva, Tahoma,
sans-serif;" Width="98px"
/></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>
&nbsp;</td><td style="text-align: center">&nbsp;</td><td>&nbsp;</td></tr></table>
</ContentTemplate>

</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Update Record">
<ContentTemplate>
<br /><asp:Panel ID="Panel4" class="panelarea" runat="server" style="text-align: left;
background-color: #339966">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
&#160;<asp:Button ID="Button2" runat="server" BorderStyle="None" Enabled="False"
Height="30px" style="font-family: 'Comic Sans MS'; font-weight: 700; color: #FFFFFF;
background-color: #FF3300" Text="Update Record" class="panelarea" Width="104px"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="updatelbl" runat="server" style="color: #FFFFFF;
font-weight: 700; font-family: 'Courier New', Courier, monospace;" Text="Successfully
Record Updated" Visible="False"></asp:Label>
</asp:Panel><br/><br/><table class="auto-style3"><tr><td
style="text-align: right" class="auto-style31">Student ID</td><td style="text-align:
left" class="auto-
style30">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="sidtxt" runat="server"
CssClass="auto-style27"></asp:TextBox></td><td>&nbsp;</td></tr><tr><td style="text-align:
right" class="auto-style31">Student Name:</td><td style="text-align: center" class="auto-
style30"><asp:TextBox ID="usnametxt" runat="server" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td>&nbsp;</td></tr><tr><td style="text-align: right"
class="auto-style31">EmailID:</td><td style="text-align: center" class="auto-
style30"><asp:TextBox ID="uemailtxt" runat="server" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator5" runat="server" ControlToValidate="uemailtxt"
ErrorMessage="RegularExpressionValidator" ValidationExpression="\w+([-+.']\w+)*@\w+([-
.]\w+)*\.\w+([-.]\w+)*" CssClass="auto-style29">Enter correct email
id</asp:RegularExpressionValidator></td></tr><tr><td class="auto-style32">Contact
No:</td><td style="text-align: center" class="auto-style30"><asp:TextBox ID="ucontacttxt"
runat="server" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td><asp:RegularExpressionValidator
ID="RegularExpressionValidator6" runat="server" ControlToValidate="ucontacttxt"
ErrorMessage="RegularExpressionValidator" ValidationExpression="[0-9]{10}"
CssClass="auto-style29">Enter Correct Contact
number</asp:RegularExpressionValidator></td></tr><tr><td class="auto-
style32">Gender</td><td style="text-align: center" class="auto-style30"><asp:RadioButton
ID="umalerbtn" runat="server" GroupName="gender" Text="Male" CssClass="auto-style27"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RadioButton ID="ufemalerbtn" runat="server"
GroupName="gender" Text="Female" CssClass="auto-
style27"/></td><td>&nbsp;</td></tr><tr><td class="auto-style32">Address</td><td
style="text-align: center" class="auto-style30"><asp:TextBox ID="uaddresstxt"
runat="server" TextMode="MultiLine" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td>
&nbsp;</td></tr><tr><td class="auto-style32">Nationality</td><td
style="text-align: left" class="auto-
style30">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList ID="unationalitydrp"
runat="server" Height="20px" Width="127px" CssClass="auto-
style27"><asp:ListItem>Indian</asp:ListItem><asp:ListItem>Others</asp:ListItem></asp:Drop
DownList></td><td>&nbsp;</td></tr><tr><td style="text-align: right" class="auto-
style31">Institute Name:</td><td style="text-align: center" class="auto-
style30"><asp:TextBox ID="uinstitutetxt" runat="server" Width="204px" CssClass="auto-
style27"></asp:TextBox></td><td>&nbsp;</td></tr><tr><td style="text-align: right"
class="auto-style31">Exam Given</td><td style="text-align: center" class="auto-style30">
<asp:TextBox ID="examgivetxtupdate" runat="server"
placeholder="Enter Subject Code for given exam " Width="204px" CssClass="auto-
style27"></asp:TextBox>
</td><td>&nbsp;</td></tr><tr><td class="auto-
style31">&nbsp;</td><td style="text-align: center" class="auto-style30"><asp:Button
ID="ubtnupdate" runat="server" Text="Update" OnClick="ubtnupdate_Click" CssClass="auto-
style27" Height="34px" Width="83px" /></td><td>&nbsp;</td></tr><tr><td class="auto-
style31">&nbsp;</td><td class="auto-style30">&nbsp;</td><td>&nbsp;</td></tr><tr><td
class="auto-style31">&nbsp;</td><td style="text-align: center" class="auto-
style30">&nbsp;</td><td>&nbsp;</td></tr></table>
</ContentTemplate>

</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="Search Record">
<ContentTemplate>
<br /><asp:Panel ID="Panel5" class="panelarea" runat="server" style="text-align: left;
background-color: #339966">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
&#160;<asp:Button ID="Button3" runat="server" BorderStyle="None" Enabled="False"
Height="30px" style="font-family: 'Comic Sans MS'; font-weight: 700; color: #FFFFFF;
background-color: #FF3300" Text="Search Record" Width="104px"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="searchlblmsg" runat="server" style="color:
#FFFFFF; font-weight: 700; font-family: 'Courier New', Courier, monospace;"
Text="Displaying Requested Record" Visible="False"></asp:Label>
</asp:Panel><br/>
<br />
<table class="auto-style3">
<tr>
<td class="auto-style34" style="text-align: right">Enter
Login ID:</td>
<td>
<asp:TextBox ID="loginidtxt" runat="server"
Height="16px" TextMode="Number" Width="195px" CssClass="auto-style33"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style34" style="text-align: right">Enter
Institute Name:</td>
<td>
<asp:TextBox ID="searchinstitutetxt" runat="server"
Height="16px" Width="195px" CssClass="auto-style33"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style34">&nbsp;</td>
<td>
<asp:Button ID="searchbtn" runat="server"
OnClick="searchbtn_Click" Text="Search" CssClass="auto-style33" />
<span class="auto-
style33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span>
<asp:Button ID="refreshbtn" runat="server"
OnClick="refreshbtn_Click" Text="Refresh" CssClass="auto-style33" />
<span class="auto-style33">&nbsp; </span> </td>
</tr>
<tr>
<td class="auto-style14">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style13" colspan="2">
<asp:DetailsView ID="DetailsView1" runat="server"
Height="50px" Width="719px">
</asp:DetailsView>
</td>
<td>&nbsp;</td>
</tr>
</table>

</ContentTemplate>

</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel4" runat="server" HeaderText="Remove Record">
<ContentTemplate>
<br /><asp:Panel ID="Panel6" class="panelarea" runat="server" style="text-align: left;
background-color: #339966">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
&#160;<asp:Button ID="Button4" runat="server" BorderStyle="None" Enabled="False"
Height="30px" style="font-family: 'Comic Sans MS'; font-weight: 700; color: #FFFFFF;
background-color: #FF3300" Text="Remove Record" Width="104px"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="removelblmsg" runat="server" style="color:
#FFFFFF; font-weight: 700; font-family: 'Courier New', Courier, monospace;"
Text="Successfully Record Removed" Visible="False"></asp:Label>
</asp:Panel><br/>
<br />
<table class="auto-style3">
<tr>
<td class="auto-style35"><span class="auto-style33">Enter
Student ID:</span></td>
<td class="auto-style22"></span></td>
<td>
<asp:TextBox ID="TextBox1" runat="server"
Height="16px" Width="195px" CssClass="auto-style33"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style35"><span class="auto-style33">Enter
Institute Name:</span></td>
<td class="auto-style22"></span></td>
<td>
<asp:TextBox ID="TextBox2" runat="server"
Height="16px" Width="195px" CssClass="auto-style33"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style35"><span class="auto-
style33"></span></td>
<td class="auto-style22"></span></td>
<td>
<asp:Button ID="removebtn" runat="server"
Text="Remove" OnClick="removebtn_Click" CssClass="auto-style33" />
<span class="auto-
style33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
<asp:Button ID="rmrefreshbtn" runat="server"
Text="Refresh" OnClick="rmrefreshbtn_Click" CssClass="auto-style33" />
</td>
</tr>
<tr>
<td class="auto-style21">&nbsp;</td>
<td class="auto-style22">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style21">&nbsp;</td>
<td class="auto-style22">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</ContentTemplate>

</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel5" runat="server" HeaderText="Display">
<ContentTemplate>
<br /><asp:Panel ID="Panel7" class="panelarea" runat="server" style="text-align: left;
background-color: #339966">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
&#160;<asp:Button ID="Button5" runat="server" BorderStyle="None" Enabled="False"
Height="30px" style="font-family: 'Comic Sans MS'; font-weight: 700; color: #FFFFFF;
background-color: #FF3300" Text="Display" Width="104px" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;
<asp:Label ID="displaymsginst" runat="server" style="color:
#FFFFFF; font-weight: 700; font-family: 'Courier New', Courier, monospace;"
Text="Displaying Requested Record" Visible="False"></asp:Label>

</asp:Panel>
<br/>
<br />
<table class="auto-style3">
<tr>
<td class="auto-style26"><span class="auto-
style33">Institute Name:</span></td>
<td class="auto-style24" style="text-align:
center"></span></td>
<td class="auto-style25" style="text-align: center">
<asp:TextBox ID="institutedptxt" runat="server"
Height="16px" Width="190px" CssClass="auto-style33"></asp:TextBox>
</td>
<td><span class="auto-style33">&nbsp;&nbsp; </span>
<asp:Button ID="displaybtnins" runat="server"
Text="Display List" OnClick="displaybtnins_Click" CssClass="auto-style33" />

</td>
</tr>
<tr>
<td class="auto-style23" colspan="4">&nbsp;</td>
</tr>
<tr>
<td class="auto-style23" colspan="4">
<asp:Panel ID="Panel8" runat="server"
ScrollBars="Both" Height="265px" Width="719px" >
<asp:GridView ID="GridView1" runat="server"
Height="246px" Width="698px" style="font-family: Verdana, Geneva, Tahoma, sans-
serif"></asp:GridView>

</asp:Panel>

</td>
</tr>
</table>

</ContentTemplate>

</cc1:TabPanel>
</cc1:TabContainer>
</td>
</tr>
<tr><td class="auto-style9">&nbsp;</td>
<td class="auto-style8"><asp:ScriptManager ID="ScriptManager1"
runat="server">
</asp:ScriptManager>
</td>
</tr>
<tr><td class="auto-style9">&nbsp;</td>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style7">&nbsp;</td>
</tr>
</table>

</asp:Content>

Student Details.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
confirmlbl.Visible = false;
updatelbl.Visible = false;
if (Session["logstat"] != null)
{
Label lbl = this.Master.FindControl("loginuserlbl") as Label;
lbl.Text = Session["logstat"].ToString();
Button btn = this.Master.FindControl("loginmasbtn") as Button;
btn.Text = Session["logoutstat"].ToString();
}
else
{
Response.Redirect("Error.aspx");
}

protected void addbtn_Click(object sender, EventArgs e)


{
string gender="";
if (malerbtn.Checked == true)
{
gender = malerbtn.Text;
}
if (femalerbtn.Checked == true)
{
gender = femalerbtn.Text;
}
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "insert into student_details values('" + snametxt.Text + "','" +
emailtxt.Text + "','" + contacttxt.Text + "','" + gender + "','" + addresstxt.Text+
"','"+nationalitydrp.Text+"','"+ institutestxt.Text +"','"+examgivetxt.Text +"')";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
confirmlbl.Visible = true;

con.Close();

protected void ubtnupdate_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "update student_details set S_Name='" + usnametxt.Text +
"',Email_ID='" + uemailtxt.Text + "',Contact_No='" + ucontacttxt.Text + "',Address='" +
uaddresstxt.Text + "',Exam_Given='"+examgivetxtupdate.Text +"' where Student_ID='" +
sidtxt.Text + "' ";

SqlCommand cmd = new SqlCommand(q, con);


int a = cmd.ExecuteNonQuery();
if (a == 1)
{
updatelbl.Visible = true;

}
else
{
updatelbl.Visible = true;
updatelbl.Text = "Student Record Not Found For Updation ";
}
}

protected void refreshbtn_Click(object sender, EventArgs e)


{
DetailsView1.Visible = false;
}

protected void searchbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from student_details where Institute_Name='" +
institutedptxt.Text + "' ";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
searchlblmsg.Text = "Displaying Records Of Students";
searchlblmsg.Visible = true;
DetailsView1.DataSource = dr;
DetailsView1.DataBind();
dr.Close();
}
else
{
searchlblmsg.Visible = true;
searchlblmsg.Text = "No Record Found";

}
}

protected void removebtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "delete student_details where Student_ID='" +TextBox1.Text +
"'and Institute_Name='" +TextBox2.Text + "' ";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
removelblmsg.Visible = true;

}
else
{
removelblmsg.Text = "Required Student Record Not Found";
removelblmsg.Visible = true;
}
}

protected void rmrefreshbtn_Click(object sender, EventArgs e)


{
TextBox1.Text = "";
TextBox2.Text = "";
removelblmsg.Visible = false;
}

protected void displaybtnins_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from student_details where Institute_Name='" +
institutedptxt.Text + "' ";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
displaymsginst.Text = "Displaying Records Of Studentss";
displaymsginst.Visible = true;
GridView1.DataSource = dr;
GridView1.DataBind();
dr.Close();
}
else
{
displaymsginst.Visible = true;
displaymsginst.Text = "No Record Found";

}
}
}
}

ViewProfile.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="ViewProfile.aspx.cs" Inherits="OnlineWeb.WebForm15" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.auto-style3
{
width: 100%;
}
.auto-style8
{ text-align: center;
}
.auto-style9
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: large;
color: #FFFFFF;
}
.auto-style10
{
width: 165px;
}
.auto-style11
{
width: 277px;
text-align: right;
}
.auto-style13
{
width: 40px;
}
.auto-style14
{
text-align: center;
}
.auto-style15
{
text-align: left;
}
.auto-style16
{
color: #4B6C9E;
font-size: medium;
}
.auto-style17
{
text-align: center;
height: 21px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
<table class="auto-style3">
<tr>
<td class="auto-style8" >
&nbsp;</td>
<td >&nbsp;</td>
<td style="text-align: right" >
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8" colspan="3" >
<asp:Panel ID="Panel1" runat="server">
<asp:Button ID="Button2" runat="server" Text="OES" Height="80px"
Width="80px" style="border-radius:200px; color: #FFFFFF; font-size: xx-large; font-
weight: 700; z-index: 1; left: 4px; top: 89px; position: absolute; background-color:
#009999;" BackColor="#009933" BorderColor="Red" BorderStyle="None" CssClass="accountInfo"
Enabled="False" ForeColor="White"/>
</asp:Panel>
</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">
<div class="auto-style9" style="text-align: right; background-color:
#009999; border-radius:10px; height: 23px;" >
<strong>Welcome&nbsp;&nbsp;
<asp:Label ID="loginnamelbl" runat="server"
Text="KishanJaiswal"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="chngpass" runat="server"
OnClick="chngpass_Click">Change Password</asp:LinkButton>
&nbsp;</strong></div>
</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">
&nbsp;<br />
</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">
<asp:Panel ID="Panel2" runat="server" style="font-family: Verdana,
Geneva, Tahoma, sans-serif">
<table class="auto-style3">
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">Login ID:</td>
<td class="auto-style13">&nbsp;</td>
<td class="auto-style15">
<asp:Label ID="logidlbl" runat="server" Text="Label"
CssClass="auto-style16"></asp:Label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">Login Name:</td>
<td class="auto-style13">&nbsp;</td>
<td class="auto-style15">
<asp:Label ID="lognlbl" runat="server" Text="Label"
CssClass="auto-style16"></asp:Label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">Email ID:</td>
<td class="auto-style13">&nbsp;</td>
<td class="auto-style15">
<asp:Label ID="emaillbl" runat="server" Text="Label"
CssClass="auto-style16"></asp:Label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">Contact Number:</td>
<td class="auto-style13">&nbsp;</td>
<td class="auto-style15">
<asp:Label ID="contactlbl" runat="server"
Text="Label" CssClass="auto-style16"></asp:Label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">Institute Name</td>
<td class="auto-style13">&nbsp;</td>
<td class="auto-style15">
<asp:Label ID="institutelbl" runat="server"
Text="Label" CssClass="auto-style16"></asp:Label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">
<asp:Panel ID="Panel3" runat="server" style="color: #FFFFFF;
background-color: #CC3300; border-radius:10px;">
<table class="auto-style3">
<tr>
<td class="auto-style14">&nbsp;<strong>
UpdateYour</strong></td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">
<asp:DropDownList ID="DropDownList1" runat="server"
Height="20px" style="color: #008080; font-family: Verdana, Geneva, Tahoma, sans-serif"
Width="136px">
<asp:ListItem>Institute Name</asp:ListItem>
<asp:ListItem>Email-ID</asp:ListItem>
<asp:ListItem>Contact No</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">
<asp:TextBox ID="TextBox1" runat="server"
Height="20px" style="font-family: Verdana, Geneva, Tahoma, sans-serif"
Width="256px"></asp:TextBox>
</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">
<asp:Button ID="Button1" runat="server" Height="26px"
OnClick="Button1_Click" Text="Update" Width="87px" style="font-family: Verdana, Geneva,
Tahoma, sans-serif" />
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td class="auto-style17" colspan="3">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">
<asp:Label ID="msglbl" runat="server" style="color: #008000; font-
size: medium; font-weight: 700; font-family: Verdana, Geneva, Tahoma, sans-serif"
Text="Updated" Visible="False"></asp:Label>
</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">&nbsp;</td>
</tr>
</table>
<br />
<br />
</div>
</asp:Content>

ViewProfile.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm15 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["logstat"] != null)
{
Label lbl = this.Master.FindControl("loginuserlbl") as Label;
lbl.Text = Session["logstat"].ToString();
Button btn = this.Master.FindControl("loginmasbtn") as Button;
btn.Text = Session["logoutstat"].ToString();
}
else
{
Response.Redirect("Error.aspx");
}
loginnamelbl.Text = Session["logstat"].ToString();
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from registration where Login_Name='" +
loginnamelbl.Text + "' ";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
logidlbl.Text = dr["Login_ID"].ToString();
lognlbl.Text = dr["Login_Name"].ToString();
emaillbl.Text = dr["Email_ID"].ToString();
contactlbl.Text = dr["Contact_No"].ToString();
institutelbl.Text = dr["Institute_Name"].ToString();

dr.Close();
}
else
{
Response.Write("No Data");
}

protected void chngpass_Click(object sender, EventArgs e)


{
Response.Redirect("ChangePassword.aspx");
}

protected void Button1_Click(object sender, EventArgs e)


{
if (DropDownList1.SelectedIndex==0)
{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "update registration set Institute_Name='" + TextBox1.Text +
"' where Login_Name='" + loginnamelbl.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
msglbl.Visible = true;
}
else
{
msglbl.Visible = true;
msglbl.Text = "Their Is An Error";

}
}
else if (DropDownList1.SelectedIndex == 1)
{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "update registration set Email_ID='" + TextBox1.Text + "'
where Login_Name='" + loginnamelbl.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
msglbl.Visible = true;
}
else
{
msglbl.Visible = true;
msglbl.Text = "Invalid Email ID";

}
}
else if (DropDownList1.SelectedIndex == 2)
{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "update registration set Contact_No='" + TextBox1.Text + "'
where Login_Name='" + loginnamelbl.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
msglbl.Visible = true;
}
else
{
msglbl.Visible = true;
msglbl.Text = "Their Is An Error";
}
}
}
}
}

ChangePassword.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"


CodeBehind="ChangePassword.aspx.cs" Inherits="OnlineWeb.WebForm14" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.auto-style4
{
text-align: right;
}
.auto-style5
{
width: 32px;
}
.auto-style7
{
text-align: center;
}
.auto-style8
{
text-align: right;
width: 30%;
height: 29px;
}
.auto-style9
{
text-align: right;
height: 29px;
}
.auto-style10
{
width: 65%;
height: 29px;
}
.auto-style11
{
color: #990000;
}
.auto-style12
{
text-align: center;
font-weight: bold;
font-size: small;
color: #008080;
text-decoration: underline;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div style="width:100%">

<table class="style4">
<tr>
<td style="width:20%">&nbsp;</td>
<td style="width:60%; text-align: center;">
<asp:Label ID="userlblmsg" runat="server" Text="Hello !"></asp:Label>
&nbsp;<asp:Label ID="loginnamelbl" runat="server" Text="KishanJaiswal"></asp:Label>
</td>
<td style="width:20%">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:Panel ID="Panel1" runat="server" style="font-family: Verdana,
Geneva, Tahoma, sans-serif" Width="571px">
<table class="style4">
<tr>
<td class="auto-style12" colspan="3">Change Your
Password</td>
</tr>
<tr>
<td class="auto-style8">Password:</td>
<td class="auto-style9"></td>
<td class="auto-style10">
<asp:TextBox ID="passtxt" runat="server"
Height="16px" Width="167px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ControlToValidate="passtxt" CssClass="auto-
style11" ErrorMessage="RequiredFieldValidator">Required Current
Password</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style7" style="width:30%; text-align:
right;">New Password:</td>
<td class="auto-style4">&nbsp;</td>
<td class="auto-style5" style="width:65%">
<asp:TextBox ID="npasstxt" runat="server"
Height="16px" Width="167px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server" ControlToValidate="npasstxt" CssClass="auto-
style11" ErrorMessage="RequiredFieldValidator">You can&#39;t left
empty</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style7" style="width:30%">Confirm New
Password:</td>
<td class="auto-style4">&nbsp;</td>
<td class="auto-style5" style="width:65%">
<asp:TextBox ID="cnpasstxt" runat="server"
Height="16px" Width="167px"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1"
runat="server" ControlToCompare="npasstxt" ControlToValidate="cnpasstxt" CssClass="auto-
style11" ErrorMessage="CompareValidator">Password Not Match</asp:CompareValidator>
</td>
</tr>
<tr>
<td class="auto-style4" colspan="3" style="width:30%">The
Confirm New Password must Match with the New Password Entry</td>
</tr>
<tr>
<td class="auto-style7"> ;</td>
<td class="auto-style4" style="width:5%">

</td>
<td class="auto-style5">
<asp:Button ID="cngbtn" runat="server" Text="Change
Password" style="color: #465C71; font-family: Verdana, Geneva, Tahoma, sans-serif"
OnClick="cngbtn_Click" />
</td>
</tr>
</table>
</asp:Panel>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:Panel ID="Panel2" runat="server" style="text-align: center;
color: #FFFFFF; font-family: Verdana, Geneva, Tahoma, sans-serif; background-color:
#006666" Visible="False">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</asp:Panel>
</td>
<td>&nbsp;</td>
</tr>
</table>

</div>
</asp:Content>

ChangePassword.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm14 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void cngbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q="update registration set Pass='"+cnpasstxt.Text+"' where
Login_Name='"+loginnamelbl.Text +"' and Pass='"+passtxt.Text +"'";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
Panel2.Visible = true;
Label1.Text = "Successfully Password Changed";
}
else
{
Panel2.Visible = true;
Label1.Text = "Their Is An Error";

}
}

}
}

Registration.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"


CodeBehind="Registration.aspx.cs" Inherits="OnlineWeb.WebForm3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style25
{
width: 98%;
}
.style26
{
}
.style27
{
font-family: "Segoe UI";
color: rgb(102, 102, 102);
font-variant: small-caps;
text-transform: none;
font-style: normal;
letter-spacing: normal;
text-align: start;
text-indent: 0px;
white-space: normal;
word-spacing: 0px;
margin-bottom: 0px;
background-color: rgb(255, 255, 255);
}
.style28
{
font-weight: bold;
font-size: x-large;
background-color: #FFFFFF;
}
.style29
{
width: 525px;
height: 41px;
}
.style30
{
height: 41px;
}
.style31
{
height: 27px;
}
.style33
{
font-family: "Segoe UI";
font-size: small;
}
.style34
{
font-family: "Segoe UI";
font-size: medium;
}
.style35
{
font-size: small;
}
.style36
{
font-size: small;
text-align: center;
}
.style37
{
font-size: small;
width: 257px;
}
.style38
{
font-family: "Segoe UI";
color: #333333;
}
.style39
{
font-size: small;
width: 123px;
height: 35px;
}
.style40
{
font-size: small;
width: 257px;
height: 35px;
}
.style41
{
font-size: small;
height: 35px;
}
.style42
{
font-size: small;
width: 123px;
height: 34px;
}
.style43
{
font-size: small;
width: 257px;
height: 34px;
}
.style44
{
font-size: small;
height: 34px;
}
.style45
{
font-size: small;
width: 123px;
height: 36px;
}
.style46
{
font-size: small;
width: 257px;
height: 36px;
}
.style47
{
font-size: small;
height: 36px;
}
.style48
{
font-size: small;
width: 123px;
height: 30px;
}
.style49
{
font-size: small;
width: 257px;
height: 30px;
}
.style50
{
font-size: small;
height: 30px;
}
.style54
{
font-size: small;
width: 123px;
height: 26px;
}
.style55
{
font-size: small;
width: 257px;
height: 26px;
}
.style56
{
font-size: small;
height: 26px;
}
.style57
{
font-family: "Segoe UI";
font-size: medium;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style59
{
font-size: small;
width: 244px;
}
.style60
{
font-size: small;
width: 244px;
height: 34px;
}
.style66
{
height: 33px;
}
.style68
{
font-size: small;
width: 244px;
height: 29px;
}
.style69
{
font-size: small;
width: 123px;
height: 29px;
}
.style70
{
font-size: small;
width: 257px;
height: 29px;
}
.style71
{
font-size: small;
height: 29px;
}
.style72
{
font-family: "Comic Sans MS";
color: #800000;
font-size: small;
}
.auto-style3
{
font-size: small;
width: 295px;
height: 35px;
}
.auto-style4
{
font-size: small;
width: 295px;
height: 34px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style5
{
font-size: small;
width: 295px;
height: 36px;
text-align: left;
}
.auto-style6
{
font-size: small;
width: 295px;
height: 30px;
text-align: left;
}
.auto-style7
{
font-size: small;
width: 295px;
height: 26px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style8
{
font-size: small;
width: 295px;
height: 29px;
}
.auto-style9
{
font-size: small;
width: 295px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style10
{
text-decoration: underline;
}
.auto-style11
{
font-size: small;
width: 295px;
height: 26px;
text-align: left;
}
.auto-style12
{
font-size: small;
width: 295px;
height: 34px;
text-align: left;
}
.auto-style13
{
font-size: small;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style14
{
font-size: small;
text-align: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style15
{
font-size: small;
width: 244px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style16
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style17
{
text-align: center;
padding-right: 10px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style18
{
font-size: small;
height: 34px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style19
{
font-size: small;
width: 123px;
height: 34px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style20
{
font-size: small;
width: 244px;
height: 34px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style21
{
font-size: small;
height: 29px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style22
{
font-size: small;
width: 123px;
height: 29px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style23
{
font-size: small;
height: 26px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style24
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #333333;
}
.auto-style25
{
font-size: small;
width: 123px;
height: 26px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style26
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #800000;
font-size: small;
}
.auto-style27
{
font-size: small;
width: 123px;
height: 30px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style28
{
font-size: small;
height: 30px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style29
{
font-size: small;
width: 123px;
height: 36px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style30
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: medium;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.auto-style31
{
height: 33px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style32
{
height: 27px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style33
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-weight: normal;
}
.auto-style34
{
font-weight: normal;
font-size: x-large;
background-color: #FFFFFF;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style35
{
width: 525px;
height: 41px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style36
{
font-weight: normal;
}
.auto-style37
{
font-weight: normal;
font-size: x-large;
background-color: #FFFFFF;
}
.auto-style38
{
font-family: "ZapfDingbats BT";
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style25" align="left">
<tr>
<td class="auto-style35">
<h2 class="style27"
style="orphans: 2; windows: 2; -webkit-text-stroke-width: 0px;">
<span class="auto-style34"><strong>C</strong></span><span
class="auto-style33"><strong>reate a </strong> <span class="auto-
style37"><strong>N</strong></span><span class="auto-style36"><strong>ew
</strong></span>
<span class="auto-style37"><strong>A</strong></span><span
class="auto-style36"><strong>ccount</strong></span></span></h2>
</td>
<td class="style30">
</td>
</tr>
<tr>
<td class="auto-style32" colspan="2">
<span class="auto-style13"
style="color: rgb(105, 105, 105); font-style: normal; font-variant-
ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-
align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);
display: inline !important; float: none;">
Use the form below to create a new account </span></td>
</tr>
<tr>
<td class="auto-style31" colspan="2">
<span class="auto-
style30">&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<spa
n class="auto-style10">Register Here&nbsp;</span></span></td>
</tr>
<tr>
<td class="auto-style16" colspan="2">

<table class="style25">
<tr class="style34">
<td class="auto-style15" rowspan="8">
<asp:Image ID="Image1" runat="server" Height="261px"
ImageUrl="~/Images/Sign Up copy.png" Width="234px" />
</td>
</tr>
<tr class="style34">
<td class="auto-style19">
Login Name:</td>
<td class="auto-style12">
<asp:TextBox ID="logintxt" runat="server" Width="232px"
CssClass="auto-style24"></asp:TextBox>
<span class="auto-style16">&nbsp;</span></td>
<td class="style44">
<asp:LinkButton ID="checkavaillnbtn" runat="server"
ForeColor="#003366" OnClick="checkavaillnbtn_Click">Check Availability</asp:LinkButton>
<span class="auto-style16">&nbsp;
</span><strong>
<asp:Label ID="availlbl" runat="server" style="color:
#009900; " Text="4" ToolTip="Login Name Available" Visible="False" CssClass="auto-
style38"></asp:Label>
</strong>&nbsp;<strong><asp:Label ID="lblnotavail"
runat="server" style="color: #800000; " Text="6" ToolTip="Already Used By Other"
Visible="False" CssClass="auto-style38"></asp:Label>
</strong>
</td>
</tr>
<tr class="style34">
<td class="auto-style19">
Email Id:</td>
<td class="auto-style12">
<asp:TextBox ID="emailtxt" runat="server" Width="232px"
CssClass="auto-style24" Enabled="False"></asp:TextBox>
<span class="auto-style16">&nbsp;</span></td>
<td class="style44">
<asp:RegularExpressionValidator
ID="RegularExpressionValidator1" runat="server"
ControlToValidate="emailtxt" CssClass="auto-style26"
ErrorMessage="RegularExpressionValidator"
ForeColor="Maroon"
ValidationExpression="\w+([-+.']\w+)*@\w+([-
.]\w+)*\.\w+([-.]\w+)*">Enter correct email id</asp:RegularExpressionValidator>
</td>
</tr>
<tr class="style34">
<td class="auto-style29">
Contact No:</td>
<td class="auto-style5">
<asp:TextBox ID="contacttxt" runat="server" Width="231px"
CssClass="auto-style24" Enabled="False"></asp:TextBox>
<span class="auto-style16">&nbsp;</span></td>
<td class="style47">
<asp:RegularExpressionValidator
ID="RegularExpressionValidator2" runat="server"
ControlToValidate="contacttxt" CssClass="auto-
style26"
ErrorMessage="RegularExpressionValidator"
ForeColor="Maroon"
ValidationExpression="[0-9]{10}">Please enter correct
contact no.</asp:RegularExpressionValidator>
</td>
</tr>
<tr class="style34">
<td class="auto-style27">
Password:</td>
<td class="auto-style6">
<asp:TextBox ID="passtxt" runat="server" CssClass="auto-
style24" Width="232px"
TextMode="Password" Enabled="False"></asp:TextBox>
<span class="auto-style16">&nbsp;</span></td>
<td class="auto-style28">
&nbsp;</td>
</tr>
<tr class="style34">
<td class="auto-style27">
Confirm Password:</td>
<td class="auto-style6">
<asp:TextBox ID="cpasstxt" runat="server" CssClass="auto-
style24" Width="231px"
TextMode="Password" Enabled="False"></asp:TextBox>
<span class="auto-style16">&nbsp;</span></td>
<td class="style50">
<asp:CompareValidator ID="CompareValidator1"
runat="server"
ControlToCompare="passtxt"
ControlToValidate="cpasstxt" CssClass="auto-style26"
ErrorMessage="CompareValidator">Password did not
match</asp:CompareValidator>
</td>
</tr>
<tr class="style34">
<td class="auto-style25">
Institute Name</td>
<td class="auto-style11">
<asp:TextBox ID="institutetxt" runat="server"
CssClass="auto-style24" Width="231px"></asp:TextBox>
</td>
<td class="auto-style23">
&nbsp;</td>
</tr>
<tr class="style34">
<td class="style54">
</td>
<td class="auto-style7">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="lbltxt" runat="server" Text="77778"
style="color: #1D60FF; font-size: medium; font-
weight: 700"></asp:Label>
&nbsp;</td>
<td class="auto-style23">
&nbsp;</td>
</tr>
<tr class="style34">
<td class="style68">
</td>
<td class="auto-style22">
&nbsp;</td>
<td class="auto-style8">
<span class="auto-
style16">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
<asp:TextBox ID="codetxt" runat="server"
style="color: #800000; " Enabled="False"
CssClass="auto-style16" ></asp:TextBox>
<span class="auto-style16">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton1" runat="server"
Height="22px"
ImageUrl="~/Images/Reload.png"
onclick="ImageButton1_Click"
style="margin-top: 3px" Width="21px" />
</span>
</td>
<td class="auto-style21">
&nbsp;</td>
</tr>
<tr class="style34">
<td class="auto-style20">
&nbsp;</td>
<td class="auto-style19">
&nbsp;</td>
<td class="auto-style4">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Enter The


Above Code&nbsp;</td>
<td class="auto-style18">
&nbsp;</td>
</tr>
<tr class="style34">
<td class="auto-style15">
&nbsp;</td>
<td class="style39">
</td>
<td class="auto-style3">
<span class="auto-
style16">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span>
<asp:Button ID="createbtn" runat="server" CssClass="auto-
style17" Text="Create"
Width="65px" OnClick="createbtn_Click" />
</td>
<td class="style41">
</td>
</tr>

<tr class="style34">
<td class="auto-style15">
&nbsp;</td>
<td class="style36" colspan="2">
<span class="auto-
style16">&nbsp;&nbsp;&nbsp;&nbsp;&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;
</span>
<asp:Label ID="successlbl" runat="server" style="color:
#009999; font-size: medium; " Text="Successfully Registered" Visible="False"
CssClass="auto-style16"></asp:Label>
</td>
<td class="auto-style13">
&nbsp;</td>
</tr>

<tr class="style34">
<td class="auto-style15">
&nbsp;</td>
<td class="auto-style14">
&nbsp;</td>
<td class="auto-style9">
&nbsp;</td>
<td class="auto-style13">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>

</asp:Content>

Registration.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.SqlClient;
using System.Web.Configuration;

namespace OnlineWeb
{
public partial class WebForm3 : System.Web.UI.Page
{
static Random random = new Random();
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 0; i < 2; i++)
{
lbltxt.Text = Convert.ToString(random.Next(1000, 5000));
}

successlbl.Visible = false;

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)


{
for (int i = 0; i < 2; i++)
{
lbltxt.Text = Convert.ToString(random.Next(1000, 5000));
}
}

protected void checkavaillnbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
String q = "select * from registration where Login_Name='" + logintxt.Text +
"'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
lblnotavail.Visible = true;
availlbl.Visible = false ;
dr.Close();
}
else
{
lblnotavail.Visible = false;
availlbl.Visible = true;
emailtxt.Enabled = true;
contacttxt.Enabled = true;
passtxt.Enabled = true;
cpasstxt.Enabled = true;
codetxt.Enabled = true;
}
}

protected void createbtn_Click(object sender, EventArgs e)


{

SqlConnection con = new


SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "insert into registration values('" + logintxt.Text + "','" +
emailtxt.Text + "','" + contacttxt.Text + "','" + passtxt.Text + "','" +
institutetxt.Text + "')";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{
successlbl.Visible = true;

}
else
{

successlbl.Text = " Error while creating account !";


successlbl.Visible = true;
}

con.Close();

{
logintxt.Text = "";
emailtxt.Text = "";
contacttxt.Text = "";
passtxt.Text = "";
cpasstxt.Text = "";
codetxt.Text = "";
institutetxt.Text = "";
}

}
}
}

Login.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="LogIn.aspx.cs" Inherits="OnlineWeb.WebForm1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style2
{
font-family: "20th Century Font";
font-size: xx-large;
font-weight: bold;
}
.style3
{
height: 23px;
}
.style5
{
font-size: x-large;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style10
{
font-family: "Segoe UI";
font-size: xx-large;
font-weight: normal;
}
.style11
{
}
.style12
{
width: 933px;
}
.style13
{
width: 911px;
text-align: center;
}
.style14
{
}
.style16
{
width: 911px;
height: 33px;
text-align: left;
}
.style17
{
width: 933px;
height: 33px;
}
.style18
{
font-family: "Segoe UI";
font-weight: bold;
font-size: large;
color: #008080;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style19
{
width: 911px;
text-align: left;
}
.style21
{
width: 911px;
text-align: left;
height: 40px;
}
.style22
{
width: 933px;
height: 40px;
}
.style23
{
font-family: "Segoe UI";
color: #3A4F63;

}
.style24
{
width: 389px;
}
.style25
{
font-family: "Segoe UI";
font-weight: bold;
font-size: large;
color: #666666;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style26
{
font-size: x-large;
}
.style28
{
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
}
.auto-style3
{
width: 721px;
}
.auto-style8
{
}
.auto-style11
{
width: 937px;
text-align: left;
}
.auto-style12
{
width: 937px;
height: 64px;
}
.auto-style13
{
width: 937px;
height: 47px;
text-align: left;
}
.auto-style15
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #3A4F63;
}
.auto-style16
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style1
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style17
{
font-weight: bold;
font-size: large;
color: #666666;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.auto-style18
{
width: 933px;
height: 64px;
}
.auto-style19
{
width: 933px;
height: 47px;
}
.auto-style20
{
width: 937px;
text-align: left;
height: 20px;
}
.auto-style21
{
width: 933px;
height: 20px;
}
.modalBackground
{
background-color:black;
filter:alpha(opacity=90)!important;
opacity:0.3!important;
z-index:20;
}
.modalpopup
{
padding:20px 0px 24px 10px;
position:relative;
width:550px;
height:80px;
background-color:white;
border:1px solid black;
border-radius:5px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<table class="style1">
<tr>
<td class="style10" colspan="3">
<span class="style1">
<span class="style26"><span
class="style28"><strong>L</strong></span></span><span
class="style28"><span class="style5">OG</span></span><span
class="style26"><span
class="style28"> <strong>I</strong></span></span></span><span
class="style5">N</span></td>
</tr>
<tr>
<td class="style14" colspan="3">
&nbsp;</td>
</tr>
<tr>
<td class="style11" colspan="3">
Please enter your login name and Password .
<asp:LinkButton ID="LinkButton2" runat="server"
onclick="LinkButton2_Click1" ForeColor="Blue">Register</asp:LinkButton>
&nbsp;if you don&#39;t have an account.</td>
</tr>
<tr>
<td class="auto-style3" rowspan="8">
<asp:Image ID="Image1" runat="server" Height="199px"
ImageUrl="~/Images/jgjh.png" Width="309px" />
</td>
<td class="auto-style11">
&nbsp;</td>
<td class="style12">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style11">
<span class="auto-style17">Account Information</span></td>
<td class="style12">
</td>
</tr>
<tr>
<td class="auto-style11">
&nbsp;</td>
<td class="style12">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style12">
<span class="auto-style16">Login Name</span><br/>
<asp:TextBox ID="logintxt" runat="server" CssClass="auto-style15"
Width="244px" Height="18px"
></asp:TextBox>
</td>
<td class="auto-style18">
</td>
</tr>
<tr>
<td class="auto-style13">
Password<br/>
<asp:TextBox ID="passwordtxt" type="Password" runat="server"
CssClass="auto-style15"
Width="244px" Height="16px"></asp:TextBox>
</td>
<td class="auto-style19">
</td>
</tr>
<tr>
<td class="auto-style11">

<asp:Button ID="loginbtn" runat="server" style="font-family: Verdana,


Geneva, Tahoma, sans-serif"
Text="Let's In" Width="63px" ToolTip="Click here"
OnClick="loginbtn_Click" />
</td>
<td class="style12">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style20">

<asp:LinkButton ID="forgotbtn" runat="server"


ForeColor="#006699">Forgot Password</asp:LinkButton>

</td>
<td class="auto-style21">
</td>
</tr>
<tr>
<td class="auto-style11">
&nbsp;</td>
<td class="style12">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">
&nbsp;</td>
<td class="auto-style11">
<asp:Label ID="errorlbl" runat="server" ForeColor="Maroon"
Text="Invalid Login Name and Password !" Visible="False" style="font-weight: 700; font-
family: Verdana, Geneva, Tahoma, sans-serif"></asp:Label>
</td>
<td class="style12">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8" colspan="3">
<center>
<div>

<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">


</cc1:ToolkitScriptManager>
<asp:Panel ID="Panel1" runat="server" CssClass="modalpopup"
Height="68px">
Enter Your Email_ID :&nbsp;<asp:TextBox ID="TextBox1"
runat="server" Width="183px"></asp:TextBox>
&nbsp;
<asp:Button ID="Button1" runat="server" style="font-family:
Verdana, Geneva, Tahoma, sans-serif" Text="Submit" Width="83px" OnClick="Button1_Click"
/>
&nbsp;<asp:Button ID="Button2" runat="server" Text="Cancel"
Width="68px" />
<br />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator"
ForeColor="#CC0000" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*">Enter Correct Email-ID</asp:RegularExpressionValidator>
<br />
<asp:Label ID="passwordlbl" runat="server" Font-Bold="True"
ForeColor="#339966" Text="Label" Visible="False"></asp:Label>

</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
CancelControlID="Button2" PopupControlID="Panel1" TargetControlID="forgotbtn"
BackgroundCssClass="modalBackground"></cc1:ModalPopupExtender>

</div>
</center>
</td>
</tr>
<tr>
<td class="auto-style3">
&nbsp;</td>
<td class="auto-style11">
&nbsp;</td>
<td class="style12">
&nbsp;</td>
</tr>
</table>

</asp:Content>

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.SqlClient;
using System.Web.Configuration;

namespace OnlineWeb
{
public partial class WebForm1 : System.Web.UI.Page
{

protected void LinkButton2_Click1(object sender, EventArgs e)


{
Response.Redirect("Registration.aspx");
}

protected void Page_Load(object sender, EventArgs e)


{

passwordtxt.Text="";
errorlbl.Visible = false;
}

protected void loginbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
String q = "select * from registration where Login_Name='" + logintxt.Text +
"'and Pass='" + passwordtxt.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();

if (dr.HasRows)
{
Response.Redirect("Institute.aspx");
Session["pasword"] = passwordtxt.Text;
Session["logstat"] = "Welcome," + logintxt.Text;
Session["logoutstat"] = "[Log Out]";
Label lbl = this.Master.FindControl("loginuserlbl") as Label;
lbl.Text = Session["logstat"].ToString();
Button btn = this.Master.FindControl("loginmasbtn") as Button;
btn.Text = Session["logoutstat"].ToString();
errorlbl.Text = "Success Login";
errorlbl.Visible = true;
dr.Close();
}

else
{

errorlbl.Visible = true;
}
}

protected void Button1_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
String q = "select * from registration where Login_ID='" + TextBox1.Text +
"'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();

if (dr.HasRows)
{
passwordlbl.Text="Hello";
passwordlbl.Visible=true;
dr.Close();
}
else
{
passwordlbl.Text = "Incorrect Email_ID Details";
passwordlbl.Visible = true;

}
}
}
}
DownloadE-Books.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="DownloadE-Books.aspx.cs" Inherits="OnlineWeb.WebForm10" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style5
{
font-family: "Segoe UI";
font-size: medium;
color: #008080;
font-weight: bold;
text-decoration: underline;
height: 248px;
text-align: center;
}
.style6
{
font-family: "Segoe UI";
font-size: small;
color: #008080;
text-align: center;
}
.style7
{
color: #008080;
}
.auto-style4
{
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
font-size: medium;
color: #3A4F63;
text-align: center;
}
.auto-style5
{
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
font-size: small;
color: #3A4F63;
text-align: center;
}
.auto-style6
{
color: rgb(0, 102, 102);
}
.auto-style14
{
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
font-size: medium;
color: #3A4F63;
text-align: center;
text-decoration: underline;
}
.auto-style15
{
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
font-size: medium;
color: #3A4F63;
text-align: center;
height: 21px;
}
.auto-style16
{
font-size: small (11 pt);
}
.auto-style17
{
font-size: small (11 pt);
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style18
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: small;
text-align: justify;
height: 0px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style4">
<tr>
<td class="style5">
<asp:Image ID="Image2" runat="server" Height="250px"
ImageUrl="~/Images/study-material-banner.jpg" Width="100%" />
<br />
</td>
</tr>

<tr>
<td class="style6" ><marquee behavior="alternate">
DOWNLOAD E-BOOKS</marquee></td>
</tr>

<tr>
<td class="auto-style14" >Programming With C-Language</td>
</tr>

<tr>
<td class="auto-style15" >
<asp:Panel ID="Panel1" runat="server" style="text-align: left; font-size:
small; font-family: 'Franklin Gothic Medium';" Height="85px">
<p class="auto-style17">The&nbsp; C&nbsp; programming language is
a&nbsp; general-purpose, high-level language&nbsp; that was originally developed&nbsp; by
Dennis M. Ritchie&nbsp; to develop&nbsp; the UNIX operating&nbsp; system at Bell Labs. C
was originally first implemented on the DEC PDP-11 computer in 1972. In 1978,&nbsp;Brian
Kernighan and&nbsp; Dennis Ritchie&nbsp; produced&nbsp; the&nbsp; first publicly
available description of C, now known as the K&amp;R standard.....Read More </p><br/>

</asp:Panel>
</td>
</tr>

<tr>
<td class="auto-style5" ><span style="font-family: ;font-
size:57pt;color:rgb(0,0,0);font-style:normal;font-variant:normal;"><span class="auto-
style6" style="font-family: Verdana; font-size: 8pt; font-style: normal; font-variant:
normal;" designer:mapid="f3"><span class="style7" style="font-family:;font-size:9pt;font-
style:normal;font-variant:normal;" __designer:mapid="f4">&nbsp;&nbsp;<strong> Download
Now </strong> <asp:ImageButton ID="ImageButton4" runat="server" Height="30px"
ImageUrl="~/Banner/downloadlogo.gif" Width="35px" />
</span></span></span></td>
</tr>

<tr>
<td class="auto-style5" >&nbsp;</td>
</tr>

<tr>
<td class="auto-style14" >Programming With JAVA</td>
</tr>

<tr>
<td class="auto-style5" >
<asp:Panel ID="Panel2" runat="server" style="text-align: justify; font-
family: Verdana, Geneva, Tahoma, sans-serif; font-size: small" Height="131px">
<p class="auto-style16">
Java programming language was originally developed by Sun
Microsystems which was initiated by JamesGosling and released in 1995 as core component
of Sun Microsystems’ Java platform (Java 1.0 [J2SE]).As of December 2008, the latest
release of the Java Standard Edition is 6 (J2SE). With the advancement of Javaand its
widespread popularity, multiple configurations were built to suite various types of
platforms. Ex: J2EE forEnterprise Applications, J2ME for Mobile Applications.Sun
Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME,
respectively. Java is guaranteed to be Write Once, Run Anywhere......Read More&nbsp;</p>
</asp:Panel>
</td>
</tr>

<tr>
<td class="auto-style5" >
<span style="font-family: ;font-size:57pt;color:rgb(0,0,0);font-
style:normal;font-variant:normal;" __designer:mapid="f2"><span class="auto-style6"
style="font-family: Verdana; font-size: 8pt; font-style: normal; font-variant: normal;"
__designer:mapid="f3"><span class="style7" style="font-family:;font-size:9pt;font-
style:normal;font-variant:normal;" __designer:mapid="f4"><strong>&nbsp;Download Now
<asp:ImageButton ID="ImageButton5" runat="server" Height="30px"
ImageUrl="~/Banner/downloadlogo.gif" Width="35px" />
</strong>
</span></span></span></td>
</tr>

<tr>
<td class="auto-style14" >
&nbsp;</td>
</tr>

<tr>
<td class="auto-style14" >
Operating System</td>
</tr>

<tr>
<td class="auto-style4" >
<asp:Panel ID="Panel3" runat="server" style="text-align: left"
Height="85px"><p class="auto-style18">An operating System
(OS) is an intermediary between users and computer hardware. It provides users
an environment in which a user can execut e programs conveniently and
efficiently. In technical terms, it is software which manages hardware. An operating
System controls the allocation of resources and services such as memory, processors,
devices and information.......Read More</p>
</asp:Panel>
</td>
</tr>

<tr>
<td class="auto-style4" >
<span style="font-family: ;font-size:57pt;color:rgb(0,0,0);font-
style:normal;font-variant:normal;" __designer:mapid="f2"><span class="auto-style6"
style="font-family: Verdana; font-size: 8pt; font-style: normal; font-variant: normal;"
__designer:mapid="f3"><span class="style7" style="font-family:;font-size:9pt;font-
style:normal;font-variant:normal;" __designer:mapid="f4">&nbsp;&nbsp;<strong>Download Now
</strong>
<asp:ImageButton ID="ImageButton6" runat="server" Height="30px"
ImageUrl="~/Banner/downloadlogo.gif" Width="35px" />
<br />
</span></span></span>
</td>
</tr>

<tr>
<td class="auto-style14" >
PHP Web Development</td>
</tr>

<tr>
<td class="auto-style4" >
<asp:Panel ID="Panel4" runat="server" Height="111px"><p class="auto-
style18">PHP started out as a small open source project that evolved as more and more
people found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way
back in 1994. PHP is a recursive acronym for &quot;PHP: Hypertext Preprocessor&quot;. PHP
is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites. It is
integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle,
Sybase, Informix, and Microsoft SQL Server.</p>
</asp:Panel>
</td>
</tr>

<tr>
<td class="auto-style4" >
<span style="font-family: ;font-size:57pt;color:rgb(0,0,0);font-
style:normal;font-variant:normal;" __designer:mapid="f2"><span class="auto-style6"
style="font-family: Verdana; font-size: 8pt; font-style: normal; font-variant: normal;"
__designer:mapid="f3"><span class="style7" style="font-family:;font-size:9pt;font-
style:normal;font-variant:normal;" __designer:mapid="f4">&nbsp; <strong>Download Now
</strong>
<asp:ImageButton ID="ImageButton7" runat="server" Height="30px"
ImageUrl="~/Banner/downloadlogo.gif" Width="35px" />
</span></span></span>
</td>
</tr>
</table>
</asp:Content>

DownloadE-Books.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineWeb
{
public partial class WebForm10 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
Response.Redirect("LogIn.aspx");
}

protected void cbtn_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("http://www.tutorials.com/Downloads");
}

protected void jbtn_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("http://www.tutorials.com/Downloads ");
}

protected void osbtn_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("http://www.tutorials.com/Downloads ");
}

protected void phpbtn_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("http://www.tutorials.com/Downloads ");
}
}
}

AdmitCard.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="Admit_Card.aspx.cs" Inherits="OnlineWeb.WebForm11" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.auto-style3
{
font-size: large;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #008080;
text-decoration: underline;
}
.auto-style4
{
width: 245px;
}
.auto-style5
{
width: 386px;
}
.auto-style6
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style4">
<tr>
<td style="width:100%;">
<asp:Image ID="Image2" runat="server" ImageUrl="~/Advertise/pic3_2-
min_1.jpg" Height="247px" Width="877px" />
</td>
</tr>
<tr>
<td class="auto-style3" style="text-align: center"><strong>Download Your
Examination Card</strong></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td style="text-align: center"><span class="auto-style6">Student ID
</span>
<asp:TextBox ID="exstdidtxt" runat="server" placeholder="Enter Student
Id" Width="154px" Height="26px" CssClass="auto-style6"></asp:TextBox>
<span class="auto-style6">&nbsp; Institute Name
</span>
<asp:TextBox ID="exinstitutetxt" runat="server" Width="154px"
placeholder="Enter Institute Name" Height="24px" CssClass="auto-style6"></asp:TextBox>
<span class="auto-style6">&nbsp;
</span>
<asp:Button ID="excrdbtn" runat="server" Text="Submit" Width="102px"
cursor="pointer" BackColor="#006699" CssClass="textEntry" OnClick="excrdbtn_Click"
ForeColor="White" Height="32px" />
</td>
</tr>
<tr>
<td style="text-align: center">&nbsp;</td>
</tr>
<tr>
<td style="text-align: center">
<asp:Panel ID="Panel2" runat="server">
<table class="style4">
<tr>
<td style="width:20%">&nbsp;</td>
<td style="width:60%">
<asp:Panel ID="Panel3" runat="server" style="border-
radius:100px; background-color: #006666;" Visible="False">
<asp:Label ID="exammsglbl" runat="server"
style="color: #FFFFFF; font-size: medium; font-family: Verdana, Geneva, Tahoma, sans-
serif;" Text="Displaying Your Examination Card"></asp:Label>
</asp:Panel>
</td>
<td style="width:20%">&nbsp;</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td style="text-align: center">&nbsp;</td>
</tr>
<tr>
<td>
<asp:Panel ID="Panel1" runat="server" style="text-align: center">
<table class="style4">
<tr>
<td class="auto-style4" style="width:20%">&nbsp;</td>
<td class="auto-style5" style="width:60%">
<asp:DetailsView ID="DetailsView1" runat="server"
Height="50px" Width="556px">
</asp:DetailsView>
</td>
<td style="width:20%">&nbsp;</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>

AdmitCard.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm11 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void excrdbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from student_details where Institute_Name='" +
exinstitutetxt.Text + "' and Student_ID='"+exstdidtxt.Text +"' ";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{

Panel3.Visible = true;
DetailsView1.DataSource = dr;
DetailsView1.DataBind();
dr.Close();
}
else
{
Panel3.Visible = true;
exammsglbl.Text = "No Record Found";

}
}
}
}

Test.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="Test.aspx.cs" Inherits="OnlineWeb.WebForm8" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style5
{
font-family: "Segoe UI";
text-transform: uppercase;
color: #800000;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style6
{
font-family: "Segoe UI";
text-transform: capitalize;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style7
{
font-family: "Segoe UI";
text-transform: capitalize;
}
.auto-style11
{
height: 30px;
}
.auto-style12
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style13
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #3A4F63;
}
.auto-style14
{
color: #3A4F63;
}
.auto-style15
{
width: 375px;
}
.auto-style17
{
text-transform: uppercase;
color: #800000;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.auto-style18
{
text-transform: capitalize;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.auto-style19
{
height: 24px;
width: 695px;
}
.auto-style20
{
width: 695px;
}
</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style4" style="font-family: Verdana, Geneva, Tahoma, sans-serif">
<tr>
<td colspan="2" style="text-align: center; background-color: #FF3300; border-
radius:100px;">
<asp:Label ID="Label10" runat="server" style="color: #FFFFFF; font-size:
medium; " Text="GOOD LUCK !"></asp:Label>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center">
<asp:Panel ID="Panel9" runat="server">
<table class="style4">
<tr>
<td style="width:30%; border-radius:100px; background-color:
#006699;">
<asp:Label ID="Label3" runat="server" style="font-weight:
400; font-size: medium; color: #FFFFFF; background-color: #006699;" Text="Institute
Name"></asp:Label>
<br />
<asp:Label ID="subnamelbl" runat="server" style="font-
weight: 400; font-size: medium; color: #FFFFFF;" Text="PHP"></asp:Label>
</td>
<td style="width:3%;">&nbsp;</td>
<td style="width:32%; border-radius:100px; border-bottom-
color:orange; color: #FFFFFF; background-color: #006699;">&nbsp; &nbsp;<br />
&nbsp;&nbsp;&nbsp; Student ID:&nbsp;&nbsp;<asp:Label ID="sidlbl" runat="server"
style="font-weight: 400; font-size: medium;" Text="Student Id"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />
&nbsp;&nbsp; Student Name:&nbsp;
<asp:Label ID="snametlbl" runat="server" style="font-
weight: 400; font-size: medium;" Text="Student Name"></asp:Label>
&nbsp;&nbsp;&nbsp;
<br />
&nbsp;Current Question:&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label9" runat="server" style="font-weight:
700" Text="1"></asp:Label>
&nbsp;out of
20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;</td>
<td style="width:2%;">&nbsp;</td>
<td style="width:33%; border-radius:100px; color: #FFFFFF;
background-color: #006699;">Question Remaining:
<asp:Label ID="Label6" runat="server" style="font-weight:
700" Text="20"></asp:Label>
<br />
Question Attempted:<asp:Label ID="Label7" runat="server"
style="font-weight: 700" Text="0"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center">
<asp:Button ID="Button1" runat="server" BackColor="#006600"
ForeColor="#006600"
Height="16px" Text="Button" Width="30px" Enabled="False" />
&nbsp;Attempted Question&nbsp;&nbsp;
<asp:Button ID="Button2" runat="server" BackColor="#FF3300"
ForeColor="#FF3300"
Height="16px" Text="Button" Width="30px" Enabled="False" />
&nbsp;Current Question&nbsp;&nbsp;
<asp:Button ID="Button3" runat="server" BackColor="#006699"
ForeColor="#006699"
Height="16px" Text="Button" Width="30px" Enabled="False" />
&nbsp;Unattempted Question</td>
</tr>
<tr>
<td colspan="2" style="text-align: right" class="auto-style11">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table class="style4">
<tr>
<td>
<asp:Timer ID="timer" runat="server" Enabled="False"
Interval="2000" OnTick="timer_Tick">
</asp:Timer>
</td>
<td class="auto-style15">
<asp:ScriptManager ID="ScriptManager2"
runat="server">
</asp:ScriptManager>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"
Enabled="False" Visible="False"></asp:TextBox>
</td>
<td style="text-align: right">&nbsp;Remaining Time in
Minute:
<asp:Label ID="Label8" runat="server" style="color:
#008000; font-size: medium; font-weight: 700; font-family: 'Comic Sans MS'"
Text="Label"></asp:Label>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td style="height:35px;">
<asp:Image ID="Image2" runat="server" Height="21px"
ImageUrl="~/Advertise/notice.png" Width="33px" />
&nbsp;<span class="auto-style18">Please Select the correct answer and click on the</span>
<span class="auto-style17">submit</span> Button after
Completion.&nbsp;&nbsp;</td>
<td style="text-align: center">

<asp:Label ID="unattemptedlbl" runat="server"


Text="4" Visible="False"></asp:Label>
<asp:Label ID="markslbl" runat="server" Text="Label"
Visible="False"></asp:Label>
</td>
</tr>
<tr>
<td rowspan="3">
<asp:Panel ID="Panel4" runat="server" Height="163px" Width="630px">
<table class="style4">
<tr>
<td class="auto-style19">
<asp:Label ID="qidlbl" runat="server"
Text="3"></asp:Label>
&nbsp;.&nbsp;<asp:Label ID="questionlbl" runat="server"
Text="what is PHP"></asp:Label>
</td>
</tr>
<tr>
<td class="auto-style19">
<asp:RadioButton ID="option_a" runat="server"
groupname="option" OnCheckedChanged="option_a_CheckedChanged" />
</td>
</tr>
<tr>
<td class="auto-style19">
<asp:RadioButton ID="option_b" runat="server"
groupname="option" OnCheckedChanged="option_b_CheckedChanged" />
</td>
</tr>
<tr>
<td class="auto-style20">
<asp:RadioButton ID="option_c" runat="server"
groupname="option" OnCheckedChanged="option_c_CheckedChanged" />
</td>
</tr>
<tr>
<td class="auto-style20">
<asp:RadioButton ID="option_d" runat="server"
groupname="option" OnCheckedChanged="option_d_CheckedChanged" />
</td>
</tr>
<tr>
<td class="auto-style20">
<br />
</td>
</tr>
</table>
</asp:Panel>

</td>
<td style="text-align: left">
<asp:Panel ID="Panel10" runat="server" Height="176px" style="text-align:
center">
<asp:Button ID="btn1" runat="server" Height="30px" Text="1"
Width="30px" OnClick="btn1_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn2" runat="server" Height="30px"
OnClick="btn2_Click" Text="2" Width="30px" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn3" runat="server" Height="30px"
OnClick="btn3_Click" Text="3" Width="30px" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn4" runat="server" Height="30px"
OnClick="btn4_Click" Text="4" Width="30px" CssClass="auto-style13" />
<br class="auto-style14" />
<asp:Button ID="btn5" runat="server" Height="30px" Text="5"
Width="30px" OnClick="btn5_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn6" runat="server" Height="30px" Text="6"
Width="30px" OnClick="btn6_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn7" runat="server" Height="30px" Text="7"
Width="30px" OnClick="btn7_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn8" runat="server" Height="30px" Text="8"
Width="30px" OnClick="btn8_Click" CssClass="auto-style13" />
<br class="auto-style14" />
<asp:Button ID="btn9" runat="server" Height="30px" Text="9"
Width="30px" OnClick="btn9_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn10" runat="server" Height="30px"
OnClick="btn10_Click" Text="10" Width="30px" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn11" runat="server" Height="30px" Text="11"
Width="30px" OnClick="btn11_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn12" runat="server" Height="30px" Text="12"
Width="30px" OnClick="btn12_Click" CssClass="auto-style13" />
<br class="auto-style14" />
<asp:Button ID="btn13" runat="server" Height="30px" Text="13"
Width="30px" OnClick="btn13_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn14" runat="server" Height="30px" Text="14"
Width="30px" OnClick="btn14_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn15" runat="server" Height="30px" Text="15"
Width="30px" OnClick="btn15_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn16" runat="server" Height="30px" Text="16"
Width="30px" OnClick="btn16_Click" CssClass="auto-style13" />
<br class="auto-style14" />
<asp:Button ID="btn17" runat="server" CssClass="auto-style13"
Height="30px" OnClick="btn17_Click" Text="17" Width="30px" />
&nbsp;<asp:Button ID="btn18" runat="server" CssClass="auto-style13"
Height="30px" OnClick="btn18_Click" Text="18" Width="30px" />
&nbsp;<asp:Button ID="btn19" runat="server" Height="30px" Text="19"
Width="30px" OnClick="btn19_Click" CssClass="auto-style13" />
&nbsp;<asp:Button ID="btn20" runat="server" Height="30px" Text="20"
Width="30px" OnClick="btn20_Click" CssClass="auto-style13" />
</asp:Panel>
&nbsp;
&nbsp;Click on the button to jump</td>
</tr>
<tr>
<td class="style7" style="text-align: center">
on the Question</td>
</tr>
<tr>
<td class="style7" style="text-align: center">
&nbsp;</td>
</tr>
</table>
<div style="text-align: center">
<asp:Button ID="btnprevious" runat="server"
CssClass="auto-style12" Height="30px" OnClick="btnprevious_Click" Text="Previous"
Width="100px" />
&nbsp; <asp:Button ID="btnsubmit" runat="server"
CssClass="auto-style12" Height="30px" Text="Submit" Width="100px"
OnClick="btnsubmit_Click" />
&nbsp; <asp:Button ID="btnendtest" runat="server" CssClass="auto-style12" Height="30px"
OnClick="btnendtest_Click" Text="End Test" Width="100px" />
&nbsp;
<asp:Button ID="btnnext" runat="server" CssClass="auto-
style12" Height="30px" OnClick="btnnext_Click" Text="Next" Width="100px" />
</div>

</asp:Content>

Test.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm8 : System.Web.UI.Page
{
static int queno=1;
int totalSeconds = 0;
int seconds = 0;
int minutes = 0;
string time = "";
static int marks = 0;
string ans = "";
string temp = "";
static int atm = 0;
static int unatm = 0;
public void attemp()
{
if (option_a.Checked == true || option_b.Checked == true || option_c.Checked
== true || option_d.Checked == true)
{
atm++;

}
else if (option_a.Checked == false && option_b.Checked == false &&
option_c.Checked == false && option_d.Checked == false)
{
unatm++;
}
}
public void test()
{
qidlbl.Text = queno.ToString();
timer.Enabled = true;
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from exam_details where Question_ID='" + qidlbl.Text +
"' and Subject_Name='" + subnamelbl.Text + "' and Institute_Name='" + Label3.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{

questionlbl.Text = dr["Question"].ToString();
option_a.Text = dr["Option_A"].ToString();
option_b.Text = dr["Option_B"].ToString();
option_c.Text = dr["Option_C"].ToString();
option_d.Text = dr["Option_D"].ToString();
ans = dr["Answer"].ToString();

dr.Close();
}

con.Close();
}
public void accesselement()
{
if (option_a.Checked == true)
{
temp = option_a.Text;
}
else if (option_b.Checked == true)
{
temp = option_b.Text;
}
else if (option_c.Checked == true)
{
temp = option_c.Text;
}
else if (option_d.Checked == true)
{
temp = option_d.Text;
}

}
public void mark()
{
accesselement();

if (temp == ans)
{
marks = marks + 5;
}
else
{
marks = marks - 3;
}
}
protected void Page_Load(object sender, EventArgs e)
{
unattemptedlbl.Text = unatm.ToString();
Label7.Text = atm.ToString();
qidlbl.Text = queno.ToString();
option_a.Checked = false;
option_b.Checked = false;
option_c.Checked = false;
option_d.Checked = false;
Label3.Text = Session["institutename"].ToString();
sidlbl.Text = Session["stdid"].ToString();
snametlbl.Text = Session["stdname"].ToString();
subnamelbl.Text = Session["subname"].ToString();
if (!IsPostBack)
{
Session["time"] = 1800;
}

if (queno==20)
{
btnnext.Enabled = false;
}

else if (queno > 1)


{
btnprevious.Enabled = true;
}
else if (queno < 1)
{
btnprevious.Enabled = false;
}
test();
accesselement();
mark();
attemp();
btnnext.Enabled = true ;
Label6.Text = (20 - queno).ToString() ;
Label9.Text = qidlbl.Text;
if (Label8.Text == "TimeOut!")
{
string resul = "";
if (marks >= 50)
{
resul = "PASS";
}
else
{
resul = "FAIL";
}
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "insert into Result values('" + sidlbl.Text + "','" +
snametlbl.Text + "','" + Label3.Text + "','" + subnamelbl.Text + "','" + Label7.Text +
"','" + unattemptedlbl.Text + "','" + resul + "','" + marks + "')";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{

Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts",
"<script>alert('Time Out!')</script>");
}
else
{

}
Response.Redirect("Exam.aspx");
}
}

protected void timer_Tick(object sender, EventArgs e)


{
Session["time"] = Convert.ToInt16(Session["time"]) - 1;
if (Convert.ToInt16(Session["time"]) <= 0)
{
Label8.Text = "TimeOut!";
}
else
{
totalSeconds = Convert.ToInt16(Session["time"]);
seconds = totalSeconds % 60;
minutes = totalSeconds / 60;
time = minutes + ":" + seconds;
Label8.Text = time;
}
}

protected void btn1_Click(object sender, EventArgs e)


{

queno = 1;

protected void btn2_Click(object sender, EventArgs e)


{

queno = 2;

protected void btn3_Click(object sender, EventArgs e)


{

queno = 3;

protected void btn4_Click(object sender, EventArgs e)


{

queno = 4;

protected void btn5_Click(object sender, EventArgs e)


{

queno = 5;

protected void btn6_Click(object sender, EventArgs e)


{

queno = 6;

protected void btn7_Click(object sender, EventArgs e)


{

queno = 7;

protected void btn8_Click(object sender, EventArgs e)


{

queno = 8;

protected void btn9_Click(object sender, EventArgs e)


{

queno = 9;

protected void btn10_Click(object sender, EventArgs e)


{

queno = 10;

protected void btn11_Click(object sender, EventArgs e)


{

queno = 11;

protected void btn12_Click(object sender, EventArgs e)


{
queno = 12;

protected void btn13_Click(object sender, EventArgs e)


{

queno = 13;

protected void btn14_Click(object sender, EventArgs e)


{

queno = 14;

protected void btn15_Click(object sender, EventArgs e)


{

queno = 15;

protected void btn16_Click(object sender, EventArgs e)


{

queno = 16;

protected void btn17_Click(object sender, EventArgs e)


{
queno = 17;

protected void btn18_Click(object sender, EventArgs e)


{

queno = 18;

protected void btn19_Click(object sender, EventArgs e)


{

queno = 19;

protected void btn20_Click(object sender, EventArgs e)


{

queno = 20;

}
protected void btnnext_Click(object sender, EventArgs e)
{

queno = queno + 1;

protected void btnprevious_Click(object sender, EventArgs e)


{

queno = queno - 1;

protected void btnendtest_Click(object sender, EventArgs e)


{
string resul = "";
if (marks >= 50)
{
resul = "PASS";
}
else
{
resul = "FAIL";
}
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "insert into Result values('" + sidlbl.Text + "','" +
snametlbl.Text + "','" + Label3.Text + "','" + subnamelbl.Text + "','" + Label7.Text +
"','" + unattemptedlbl.Text + "','" + resul + "','" + marks + "')";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{

Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts",
"<script>alert('You are sure want to cancel the Examination')</script>");
}
else
{

}
Response.Redirect("Exam.aspx");
btnsubmit.Enabled = true;
Response.Redirect("Exam.aspx");
}

protected void btnsubmit_Click(object sender, EventArgs e)


{
string resul = "";
if (marks >= 50)
{
resul = "PASS";
}
else
{
resul = "FAIL";
}
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "insert into Result values('" + sidlbl.Text + "','"
+snametlbl.Text + "','" +Label3.Text + "','" + subnamelbl.Text + "','" + Label7.Text +
"','"+unattemptedlbl.Text +"','"+resul +"','"+marks +"')";
SqlCommand cmd = new SqlCommand(q, con);
int a = cmd.ExecuteNonQuery();
if (a == 1)
{

Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts",
"<script>alert('SuccessFully Submitted Test Results')</script>");
}
else
{

}
Response.Redirect("Exam.aspx");

protected void option_a_CheckedChanged(object sender, EventArgs e)


{
if (option_a.Text == ans)
{
marks = marks + 5;
markslbl.Text = marks.ToString();
}
else
{
marks = marks - 3;
markslbl.Text = marks.ToString();
}

protected void option_b_CheckedChanged(object sender, EventArgs e)


{
if (option_b.Text == ans)
{
marks = marks + 5;
markslbl.Text = marks.ToString();
}
else
{
marks = marks - 3;
markslbl.Text = marks.ToString();
}

}
protected void option_c_CheckedChanged(object sender, EventArgs e)
{
if (option_c.Text == ans)
{
marks = marks + 5;
markslbl.Text = marks.ToString();
}
else
{
marks = marks - 3;
markslbl.Text = marks.ToString();
}

protected void option_d_CheckedChanged(object sender, EventArgs e)


{
if (option_d.Text == ans)
{
marks = marks + 5;
markslbl.Text = marks.ToString();
}
else
{
marks = marks - 3;
markslbl.Text = marks.ToString();
}

}
}

ContactUs.aspx
<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true"
CodeBehind="ContactUs.aspx.cs" Inherits="OnlineWeb.About" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">


<style type="text/css">
.style4
{
width: 100%;
}
.style5
{
width: 100%;
}
.style6
{
font-family: "Segoe UI";
font-size: xx-large;
color: #008080;
font-weight: bold;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
text-decoration: underline;
}
.style7
{
font-family: "ZapfDingbats BT";
font-weight: bold;
font-size: xx-large;
color: #008080;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.style9
{
text-align: center;
}
.style10
{
font-family: "Segoe UI";
text-transform: uppercase;
font-size: medium;
color: #008080;
}
.style11
{
font-size: medium;
}
.style13
{
color: #006666;
}
.style14
{
color: #006699;
}
</style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<table class="style5">
<tr>
<td colspan="4" style="text-align: center">
<span class="style6">CONTACT US</span> <span class="style7">&amp;</span></td>
</tr>
<tr>
<td class="style9" colspan="4">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<td colspan="4">
&nbsp;</td>
</tr>
<tr>
<td class="style10" colspan="4" style="text-align: center">
We Would Love to talk to you about any new Query</td>
</tr>
<tr>
<td class="style11" colspan="4"
style="text-align: center; text-transform: uppercase; color: #008080; font-
family: 'Segoe UI'">
You May have or any of the services that we offer</td>
</tr>
<tr>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
<br />
<br />
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td colspan="2" style="text-align: center">
&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton1" runat="server" Height="160px"
ImageUrl="~/Banner/gmail-icon.png" Width="160px" ToolTip="Mail Us"
onclick="ImageButton1_Click" />
&nbsp;<br />
Gmail</td>
<td style="text-align: center">
&nbsp; &nbsp;&nbsp;
<asp:ImageButton ID="ImageButton2" runat="server" Height="160px"
ImageUrl="~/Banner/fblogo.png" Width="160px" ToolTip="Like Us"
OnClick="ImageButton2_Click" />
&nbsp;<br />
<span class="style13">Facebook</span></td>
<td style="text-align: center">
&nbsp; &nbsp;&nbsp;
<asp:ImageButton ID="ImageButton3" runat="server" Height="160px"
ImageUrl="~/Banner/twitterlogo.png" Width="160px" ToolTip="Follow Us"
OnClick="ImageButton3_Click" />
&nbsp;&nbsp;
<br />
<span class="style14">Twitter </span>
</td>
</tr>
<tr>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
</table>
</asp:Content>

ContactUs.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineWeb
{
public partial class About : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("https://mail.google.com/mail/u/0/");
}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("https://www.facebook.com");

protected void ImageButton3_Click(object sender, ImageClickEventArgs e)


{
Response.Redirect("https://www.twitter.com");

}
}
}

Help.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="Help.aspx.cs" Inherits="OnlineWeb.WebForm5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style5
{
font-family: "Segoe UI";
font-size: xx-large;
color: #008080;
}
.style6
{
font-family: "Courier New", Courier, monospace;
font-size: larger;
}
.style7
{
font-size: medium;
color: #2E8B57;
border-left-color: #A0A0A0;
border-right-color: #C0C0C0;
border-top-color: #A0A0A0;
border-bottom-color: #C0C0C0;
padding: 1px;
}
.accountInfo
{
color: #4E5766;
font-size: medium;
font-family: "Segoe UI";
}
.style8
{
text-align: left;
}
.style9
{
height: 34px;
}
.style10
{
color: #008080;
}

.auto-style3
{
}
.auto-style4
{
width: 124px;
}
.auto-style5
{
width: 421px;
}

.auto-style6
{
width: 124px;
height: 16px;
}
.auto-style7
{
width: 421px;
height: 16px;
}
.auto-style8
{
text-align: left;
height: 16px;
}
.auto-style9
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #006699;
}
.auto-style10
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}

</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<table class="style4">
<tr>
<td class="style5" colspan="3" style="text-align: center">
<strong>HELP <span class="style6">&amp;</span> SUPPORT<br />
</strong><span class="style7"><strong>Search our Knowledge base for
answer to
common questions</strong></span></td>
</tr>
<tr>
<td class="auto-style3" colspan="3">
&nbsp;</td>
</tr>
<tr>
<td class="style9" colspan="3">
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox1" runat="server" CssClass="accountInfo"
Height="47px"
Width="381px"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button1" runat="server" CssClass="textEntry"
Height="46px"
style="color: #FFFFFF; font-family: 'Comic Sans MS'; background-
color: #006699; cursor:pointer;"
Text="Search" Width="104px" OnClick="Button1_Click" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<td class="style10" colspan="3" style="text-align: center">
<asp:Label ID="anslbl3" runat="server" style="color: #333333; font-
family: Verdana, Geneva, Tahoma, sans-serif" Text="Question lets first Approved by Admin"
Visible="False"></asp:Label>
<br />
</td>
</tr>
<tr>
<td style="text-align: left" class="auto-style6">
&nbsp;<asp:Label ID="questionlbl" runat="server" Text="What is PHP"
CssClass="auto-style10" Visible="False"></asp:Label>
&nbsp;&nbsp;</td>
<td class="auto-style7">
<asp:Label ID="anslbl" runat="server" Text="The PHP Hypertext Pre-
processor (PHP) is a programming language that allows web" CssClass="auto-style9"
Visible="False"></asp:Label>
<br />

</td>
<td class="auto-style8">
</td>
</tr>
<tr>
<td style="text-align: left" class="auto-style4">
&nbsp;<asp:Label ID="questionlbl0" runat="server" Text="What is OS"
CssClass="auto-style10" Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;</td>
<td class="auto-style5">
<asp:Label ID="anslbl0" runat="server" Text="An operating system (OS) is
a collection of software that manages computer hardware resources and provides common"
CssClass="auto-style9" Visible="False"></asp:Label>
</td>
<td class="style8">
&nbsp;</td>
</tr>
<tr>
<td style="text-align: left" class="auto-style4">
&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class="auto-style5">
&nbsp;</td>
<td class="style8">
&nbsp;</td>
</tr>
<tr>
<td style="text-align: left" class="auto-style4">
&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class="auto-style5">
&nbsp;</td>
<td class="style8">
&nbsp;</td>
</tr>
</table>

</asp:Content>

Help.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineWeb
{
public partial class WebForm5 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
if (TextBox1.Text == "What is PHP")
{
questionlbl.Visible = true;
anslbl.Visible = true;
}
else if(TextBox1.Text == "What is OS")
{
questionlbl0.Visible = true;
anslbl0.Visible = true;
}

else
{
anslbl3.Visible = true;
}
}
}
}

Error.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Error.aspx.cs"
Inherits="OnlineWeb.Error" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-weight: bold;
font-size: large;
color: #800080;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: center">

&nbsp;<span class="auto-style1">Server Error </span>


<br class="auto-style1" />
<span class="auto-style1">Requested Page Not Found</span><br />
<asp:Image ID="Image1" runat="server" Height="324px"
ImageUrl="~/Banner/design1.png" Width="607px" />

<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" style="font-
family: Verdana, Geneva, Tahoma, sans-serif" Text="Back To Home" />

</div>
</form>
</body>
</html>

Error.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineWeb
{
public partial class Error : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
Response.Redirect("Home.aspx");
}
}
}

Exam.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="Exam.aspx.cs" Inherits="OnlineWeb.WebForm4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style4
{
width: 99%;
}
.style5
{
width: 293px;
text-align: center;
}
.style6
{
width: 297px;
}
.style7
{
width: 293px;
text-align: left;
}
.style8
{
width: 297px;
height: 21px;
}
.style9
{
width: 293px;
text-align: left;
height: 21px;
}
.style10
{
height: 21px;
}
.style11
{
width: 293px;
text-align: center;
font-family: "Segoe UI";
font-size: medium;
color: #008080;
}
.style12
{
font-size: large;
}
.style13
{
font-family: "Comic Sans MS";
color: #034AF3;
}
.boom:hover
{
background-color:seagreen ;
color:white;
}
.auto-style3
{
width: 410px;
text-align: center;
}
.auto-style4
{
width: 410px;
text-align: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: medium;
color: #008080;
}
.auto-style5
{
width: 410px;
text-align: right;
}
.auto-style6
{
width: 410px;
text-align: left;
height: 21px;
}
.auto-style7
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style8
{
width: 410px;
text-align: right;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style9
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #034AF3;
}
.auto-style10
{
width: 410px;
text-align: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style11
{
font-weight: normal;
}
.auto-style12
{
text-decoration: underline;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style4">
<tr>
<td colspan="3">
<marquee behavior="alternate"> Hello Microtek Institute</marquee>
</td>
</tr>
<tr>
<td class="style6">
&nbsp;</td>
<td class="auto-style3">
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style6" rowspan="7">
<asp:Image ID="Image2" runat="server" Height="181px"
ImageUrl="~/Banner/01.jpg"
Width="251px" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;</td>
<td class="auto-style4">
&nbsp;<strong class="auto-style11"><span class="style12"><span
class="auto-style12"> Examination Details</span>&nbsp;</span></strong></td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style10">
&nbsp;</td>
<td>
&nbsp;&nbsp; </td>
</tr>
<tr>
<td class="auto-style5">
<span class="auto-
style7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;Student ID&nbsp;&nbsp; :&nbsp;&nbsp; &nbsp;&nbsp;</span><asp:TextBox
ID="sidtxt" runat="server" CssClass="auto-style9" Width="170px"></asp:TextBox>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style5">
<span class="auto-
style7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;Student Name&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; </span>
<asp:TextBox ID="snametxt" runat="server" CssClass="auto-style9"
Width="170px"></asp:TextBox>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style5">
<span class="auto-
style7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;
Subject Name&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; </span> <asp:TextBox
ID="subnametxt" runat="server" CssClass="auto-style9" Width="170px"></asp:TextBox>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style5">
<span class="auto-style7">&nbsp;Institute Name&nbsp;&nbsp;
:&nbsp;&nbsp;&nbsp;&nbsp; </span> <asp:TextBox ID="Institutetxt" runat="server"
CssClass="auto-style9" Width="170px"></asp:TextBox>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style5">
<span class="auto-
style7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>
<asp:Button ID="submitbtn" runat="server" Text="Submit"
OnClick="submitbtn_Click" CssClass="auto-style7"
/>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style6">
&nbsp;</td>
<td class="auto-style8">
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style8">
</td>
<td class="auto-style6">
</td>
<td class="style10">
</td>
</tr>
<tr>
<td class="style6">
&nbsp;</td>
<td class="auto-style3">
<asp:Label ID="Label1" runat="server" style="color: #800000; font-size:
small; " Text="Incorrect Details !" Visible="False" CssClass="auto-style7"></asp:Label>
</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="style6">
&nbsp;</td>
<td class="auto-style3">
<asp:Label ID="Label2" runat="server" style="color: #800000; font-size:
small; " Text="You Have Already Given Your Exam !" Visible="False" CssClass="auto-
style7"></asp:Label>
</td>
<td>
&nbsp;</td>
</tr>
</table>
</asp:Content>

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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm4 : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)


{
Session["stdid"] = sidtxt.Text;
Session["stdname"] = snametxt.Text;
Session["institutename"] = Institutetxt.Text;
Session["subname"] = subnametxt.Text;
}

protected void submitbtn_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from student_details where Student_ID='" + sidtxt.Text +
"'and S_Name='" + snametxt.Text + "' and Exam_Given='" + subnametxt.Text + "' and
Institute_Name='" + Institutetxt.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
Response.Redirect("Test.aspx");

dr.Close();
}
else
{
Label1.Visible = true;

}
}
}
}

Site.master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs"
Inherits="OnlineWeb.SiteMaster" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1"


%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style2
{
font-weight: normal;
font-family: "Segoe UI";
font-size: larger;
}
.style3
{
font-family: "Segoe UI";
font-size: xx-large;
}
.menu
{
text-align: right;
}
.menu
{
text-align: center;
}
.style4
{
width: 99%;
}

.auto-style1
{
font-size: larger;
}
.auto-style2
{
font-family: "Segoe UI";
font-size: larger;
}

.menu
{
font-size: small;
font-family: "Segoe UI";
}
.menu
{
font-size: medium;
font-family: "Segoe UI";
}

.menu
{
color: #FFFFFF;
font-size: x-small;
font-family: "Segoe UI";
}
.menu
{
color: #FFFFFF;
font-size: x-small;
font-family: "Segoe UI";
}
.menu
{
color: #FFFFFF;
font-size: small;
font-family: "Segoe UI";
}
.menu
{
color: #FFFFFF;
font-size: small;
font-family: "Segoe UI";
}

.menu
{
font-size: small;
font-family: "Segoe UI";
}
.menu
{
font-size: medium;
font-family: "Segoe UI";
}
.menu
{
font-size: medium;
font-family: "Segoe UI";
}
.menu
{
color: #FFFFFF;
font-size: small;
font-family: "Segoe UI";
}
.menu
{
color: #FFFFFF;
font-size: small;
font-family: "Segoe UI";
}
.btncolor
{
color:#fff;
background-color:transparent;
border: 0px;
}

</style>
</head>
<body >
<form runat="server">
<div class="page" style="width:100%;">
<div class="header" style="width:100%;" >
<div class="title">

<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Logo.png"


style="z-index: 1; left: 8px; top: 0px; position: absolute;
height: 58px; width: 73px; right: 907px;" /><h1>
<span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="auto-style2">o</span><span class="auto-style1">nLine </span> <span
class="auto-style2">E</span><span class="auto-style1">xamination
</span>
<span class="style2"><strong>s</strong></span><span class="auto-
style1">ystem&nbsp;</span></h1>
</div>

<div class="clear hideSkiplink" >


<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu"
EnableViewState="false" IncludeStyleBlock="false"
Orientation="Horizontal"
onmenuitemclick="NavigationMenu_MenuItemClick" >
<Items>
<asp:MenuItem NavigateUrl="~/Home.aspx" Text="Home"
ToolTip="Home"/>
<asp:MenuItem Text="Institute" Value="Institute"
NavigateUrl="~/Institute.aspx" ToolTip="Institute">
</asp:MenuItem>
<asp:MenuItem Text="Student" Value="ExamDetails" ToolTip="Exam
Details" Selectable="False" >
<asp:MenuItem Text="Result" ToolTip="Result" Value="Result"
NavigateUrl="~/Result.aspx"></asp:MenuItem>
<asp:MenuItem Text="Start Exam" Value="Exam"
NavigateUrl="~/Exam.aspx" ToolTip=" Start
Exam"></asp:MenuItem>
<asp:MenuItem Text="Admit Card" ToolTip="Admit Card"
Value="Admit Card" NavigateUrl="~/Admit_Card.aspx"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/DownloadE-Books.aspx"
Text="Downloads" Value="Downloads" ToolTip="Downloads"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/ContactUs.aspx" Text="ContactUs"
ToolTip="ContactUs"/>
<asp:MenuItem Text="Help" Value="Help" NavigateUrl="~/Help.aspx"
ToolTip="Help"></asp:MenuItem>
</Items>
</asp:Menu>
&nbsp;</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear">
<table class="style4">
<tr>
<td style="color: #FFFFFF; font-family: 'Segoe UI'; text-align:
center; background-color: #FFFFFF">
<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-
Names="Verdana"
Font-Size="0.8em" PathSeparator=" : ">
<CurrentNodeStyle ForeColor="#333333" />
<NodeStyle Font-Bold="True" ForeColor="#666666" />
<PathSeparatorStyle Font-Bold="True" ForeColor="#1C5E55" />
<RootNodeStyle Font-Bold="True" ForeColor="#1C5E55" />
</asp:SiteMapPath>
&nbsp;</td>
</tr>
<tr>
<td style="width:100%;">

<asp:Label ID="loginuserlbl" runat="server" style="z-index: 1;


left: 764px; top: 10px; position: absolute; width: 73px; color: #FFFFFF; height: 15px;
font-family: Verdana, Geneva, Tahoma, sans-serif; text-align: right;"></asp:Label>

</td>
</tr>
</table>
<div class="footer" style="color: #FFFFFF; font-family: 'Segoe UI'; text-
align: center; background-color: #3A4F63; width: 100%;"> DESIGNED AND DEVELOPED BY K.K.
JAISWAL<asp:Button ID="loginmasbtn" CssClass="btncolor" runat="server" style="z-index: 1;
left: 772px; top: 30px; position: absolute" Text="[ Log In ]" OnClick="loginmasbtn_Click"
/>
<br />
COPYRIGHT © MARCH-2017 </div>
</div>
</div>

</form>
</body>
</html>

Site.Master.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineWeb
{
public partial class SiteMaster : System.Web.UI.MasterPage
{

protected void NavigationMenu_MenuItemClick(object sender, MenuEventArgs e)


{

protected void Page_Load(object sender, EventArgs e)


{

protected void loginmasbtn_Click(object sender, EventArgs e)


{
if (loginmasbtn.Text == "[ Log In ]")
{

Response.Redirect("LogIn.aspx");
loginuserlbl.Visible = false;
}
else if(loginmasbtn.Text=="[Log Out]")
{
loginuserlbl.Visible = true;
Session.Remove("logstat");
Response.Redirect("Home.aspx");

}
}
}
}

Result.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="Result.aspx.cs" Inherits="OnlineWeb.WebForm13" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style5
{
font-family: "Segoe UI";
font-size: xx-large;
color: #1C5E55;
font-weight: bold;
}
.auto-style3
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: xx-large;
color: #008080;
}
.auto-style4
{
width: 267px;
}
.auto-style5
{
height: 54px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.auto-style6
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table class="style4">
<tr>
<td>
<asp:Panel ID="Panel1" runat="server" style=" border-radius:20px;color:
#FFFFFF; text-align: center; background-color: #006699" Visible="False">
<asp:Label ID="Label23" runat="server" Text="No Result Found !"
style="font-size: medium; font-weight: 700; font-family: Verdana, Geneva, Tahoma, sans-
serif"></asp:Label>
</asp:Panel>
</td>
</tr>
</table>
<div>
<div >
<table class="style4">
<tr>
<td class="auto-style4" rowspan="3">
<asp:Image ID="Image2" runat="server" Height="217px"
ImageUrl="~/Images/searchresult.png" Width="273px" />
</td>
<td class="auto-style3" style="text-align: center"><strong>GET
YOUR RESULT</strong></td>
</tr>
<tr>
<td>
<span class="auto-
style6">&nbsp;&nbsp;&nbsp;&nbsp;</span><asp:TextBox ID="studentidtxt" runat="server"
placeholder="Enter Your Student ID" Height="35px" style="color: #4E5766"
Width="219px" CssClass="auto-style6"></asp:TextBox>
<span class="auto-style6">&nbsp;&nbsp;&nbsp;
</span>
<asp:DropDownList ID="searchdrpsubject" runat="server"
Height="35px" Width="190px" style="color: #008080; " CssClass="auto-
style6"><asp:ListItem>C-Language</asp:ListItem><asp:ListItem>Programming with
C++</asp:ListItem><asp:ListItem>Programming with
Java</asp:ListItem><asp:ListItem>Programming with C#</asp:ListItem>
<asp:ListItem>HTML</asp:ListItem>
<asp:ListItem>PHP</asp:ListItem>
<asp:ListItem>Javascript</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
<asp:ListItem>SQL Server</asp:ListItem>
<asp:ListItem>My SQL</asp:ListItem>
<asp:ListItem>Operating System</asp:ListItem>
<asp:ListItem>Networking</asp:ListItem>
<asp:ListItem>A/C with Tally</asp:ListItem>
<asp:ListItem>Photoshop</asp:ListItem>
</asp:DropDownList>
&nbsp;<asp:Button ID="resultbtn" runat="server" Text="Submit"
OnClick="Button1_Click" Height="35px" Width="117px" CssClass="auto-style6" />
<br class="auto-style6" />
</td>
</tr>
<tr>
<td style="text-align: left" class="auto-style5">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
</div>
<div style="text-align: center">

<asp:Panel ID="resultpanel" runat="server" Height="126px" Visible="False"


style="font-family: Verdana, Geneva, Tahoma, sans-serif; text-align: left;"><br/><br/>
<table class="style4">
<tr>
<td>
<asp:Label ID="Label11" runat="server" CssClass="bold"
Text="StudentID"></asp:Label>
</td>
<td>
<asp:Label ID="Label12" runat="server" CssClass="bold"
Text="Name of the Student"></asp:Label>
</td>
<td>
<asp:Label ID="Label13" runat="server" CssClass="bold" Text="
Exam Given"></asp:Label>
</td>
<td>
<asp:Label ID="Label21" runat="server" CssClass="bold"
Text="Attempted"></asp:Label>
</td>
<td>
<asp:Label ID="Label14" runat="server" CssClass="bold"
Text="Result"></asp:Label>
</td>
<td>
<asp:Label ID="Label15" runat="server" CssClass="bold"
Text="Marks Obtained"></asp:Label>
</td>
<td>
<asp:Label ID="Label22" runat="server" CssClass="bold"
Text="Toatal Marks"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="idlbl" runat="server" Text="1001"></asp:Label>
</td>
<td>
<asp:Label ID="namelbl" runat="server" Text="Kishan
Jaiswal"></asp:Label>
</td>
<td>
<asp:Label ID="examlbl" runat="server" Text="Programming in
Java"></asp:Label>
</td>
<td>
<asp:Label ID="attemptlbl" runat="server"
Text="1"></asp:Label>
</td>
<td>
<asp:Label ID="resultlbl" runat="server"
Text="Pass"></asp:Label>
</td>
<td>
<asp:Label ID="markslbl" runat="server"
Text="96"></asp:Label>
</td>
<td>
<asp:Label ID="tmarkslbl" runat="server"
Text="100"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div style="text-align: center">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;
</div>
</div>
&nbsp;
</asp:Content>

Result.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.SqlClient;
using System.Web.Configuration;
namespace OnlineWeb
{
public partial class WebForm13 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["kishan"].ConnectionString);
con.Open();
string q = "select * from Result where Student_ID='" + studentidtxt.Text + "'
and Exam_Given='" + searchdrpsubject.Text + "'";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
resultpanel.Visible = true;
idlbl.Text = dr["Student_ID"].ToString();
namelbl.Text = dr["Student_Name"].ToString();
examlbl.Text = dr["Exam_Given"].ToString();
attemptlbl.Text = dr["Attempted_Question"].ToString();
resultlbl.Text = dr["Result"].ToString();
markslbl.Text = dr["Total_Marks"].ToString();
dr.Close();
}
else
{
Panel1.Visible = true;
}

con.Close();

}
}

Site.css
/* DEFAULTS
----------------------------------------------------------*/

body
{
background: #FFFFFF;
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica,
Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #696969;
width: 894px;
}

a:link, a:visited
{
color: #FFFFFF;
font-weight: 400;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: small;
text-transform: none;
text-align: right;
}

a:hover
{
color: #1d60ff;
text-decoration: none;
}

a:active
{
color: #034af3;
}

p
{
margin-bottom: 10px;
line-height: 1.6em;
height: 215px;
color: #496077;
font-family: Verdana, Geneva, Tahoma, sans-serif;
text-align: justify;
font-size: small;
}

/* HEADINGS
----------------------------------------------------------*/

h1, h2, h3, h4, h5, h6


{
font-size: 1.5em;
color: #666666;
font-variant: small-caps;
text-transform: none;
font-weight: 200;
margin-bottom: 0px;
}

h1
{
font-size: 1.6em;
padding-bottom: 0px;
margin-bottom: 0px;
}

h2
{
font-size: 1.5em;
font-weight: 600;
}

h3
{
font-size: 1.2em;
}

h4
{
font-size: 1.1em;
}

h5, h6
{
font-size: 1em;
}

/* this rule styles <h1> and <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0px;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/

.page
{
width: auto;
background-color: #fff;
margin: 0px 0px 0px 0px;
border: 1px solid #496077;
}

.header
{
position: relative;
margin: 0px;
padding: 0px;
background:#4b6c9e;
width: 113%;
top: 0px;
left: 0px;
height: 75px;
}

.header h1
{
font-weight: 700;
margin: 0px;
padding: 0px 0px 0px 20px;
color: #f9f9f9;
border: none;
line-height: 2em;
font-size: 2em;
}

.main
{
padding: 0px 0px;
/*// margin: 12px 8px 8px 8px;*/
min-height: 420px;
}

.leftCol
{
padding: 6px 0px;
margin: 12px 8px 8px 8px;
width: 200px;
min-height: 200px;
}

.footer
{
color: #FFFFFF;
padding: 8px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;
font-family: "Segoe UI";
background-color: #3A4F63;
height: 37px;
}

/* TAB MENU
----------------------------------------------------------*/

div.hideSkiplink
{
background-color:#3a4f63;

height: 34px;
}

div.menu
{
padding: 4px 0px 4px 8px;
}

div.menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}

div.menu ul li a, div.menu ul li a:visited


{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}

div.menu ul li a:hover
{
background-color: white;
color: #465c71;
text-decoration: none;
}

div.menu ul li a:active
{
background-color: white;
color: orange;
text-decoration: none;
}
div.menu ul li a:hover + .hidden, .hidden:hover
{
display: block;
}
/* FORM ELEMENTS
----------------------------------------------------------*/

fieldset
{
margin: 1em 0px;
padding: 1em;
border: 1px solid #ccc;
height: 148px;
width: 476px;
font-size: large;
}

fieldset p
{
margin: 2px 12px 10px 10px;
}

fieldset.login label, fieldset.register label, fieldset.changePassword label


{
display: block;
}

fieldset label.inline
{
display: inline;
}

legend
{
font-size: 1.1em;
font-weight: 600;
padding: 2px 4px 8px 4px;
text-align: left;
color: #009999;
}

input.textEntry
{
border: 1px solid #ccc;
border-radius:3px;
color: #FFFFFF;
font-weight: 700;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}

input.passwordEntry
{
width: 320px;
border: 1px solid #ccc;
border-radius:3px;
}

div.accountInfo
{
width: 42%;
}
/* MISC
----------------------------------------------------------*/

.clear
{
clear: both;
}

.title
{
display: block;
float: left;
text-align: left;
width: auto;
}

.loginDisplay
{
font-size: 1.1em;
display: block;
text-align: right;
padding: 10px;
color: White;
}

.loginDisplay a:link
{
color: white;
z-index: 1;
left: 881px;
top: 19px;
position: absolute;
text-align: right;
}

.loginDisplay a:visited
{
color: white;
}

.loginDisplay a:hover
{
color: white;
}

.failureNotification
{
font-size: 1.2em;
color: Red;
}

.bold
{
font-weight: bold;
}

.submitButton
{
text-align: center;
padding-right: 10px;
font-family: "Segoe UI";

web.config
<?xml version="1.0"?>
<configuration>

<connectionStrings>
<add name="kishan" providerName="System.Data.SqlClient" connectionString="Data
Source=KISHAN-JAISWAL\SQLEXPRESS;Initial Catalog=OnlineWebExamination;Integrated
Security=True;Pooling=False;"/>
</connectionStrings>

</configuration>

Global.asax
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace OnlineWeb
{
public class Global : System.Web.HttpApplication
{

void Application_Start(object sender, EventArgs e)


{
// Code that runs on application startup

void Application_End(object sender, EventArgs e)


{
// Code that runs on application shutdown

void Application_Error(object sender, EventArgs e)


{
// Code that runs when an unhandled error occurs

void Session_Start(object sender, EventArgs e)


{
// Code that runs when a new session is started
}

void Session_End(object sender, EventArgs e)


{
// Code that runs when a session ends.
// Note: The Session_End event is raised only when the sessionstate mode
// is set to InProc in the Web.config file. If session mode is set to StateServer
// or SQLServer, the event is not raised.

}
}

Implementation and Maintenance

The whole process of system analysis and design is to provide a solution to problems of the user. Finally
when the system has been designed and tested it needs to be implemented. The phase of
implementation includes installation of hardware and software, user training and conversion.

User training:

User training will enable the user to operate the system successfully.

Various user guides and methods have been used for user training. Important

Strategies that are used in user training are as follow:

(i) An important document for user training is a one page summary of the functionality of the
system. such a document provides instructions to the user on how to start the system, how to
perform the various functionalities and meaning of various codes.
(ii) Another user training element is a training demo. Live demonstrations with personal contact are
very effective for training user.
(iii) The third element of user training is the Resident expert. Such a person can relate much better
with the user groups and use examples based on common experience to train the user.
.
Maintenance:

After installation is completed the maintenance phase begins. A computer system required
periodic maintenance. The objective of maintenance is to keep up the system up-to-date.

Many activities classified as maintenance are actually enhancement. Maintenance means


restoring something to its original condition. Enhancement means adding, modifying or
redeveloping the code to support changes in specification. But generally in maintenance phase
we perform maintenance and enhancement both.

Types of maintenance:
There are following types of maintenance:

(i)Corrective Maintenance:

Corrective maintenance is performed to correct any error in the implemented system. This type
of maintenance is performed to modify design, coding and to remove implementation problems.

(ii)Adaptive maintenance:

This type of maintenance is performed according to the changing requirement of market and
organization .It is performed with a view to keep the system up to date. For example if the
government changes tax rate then our system should be updated according to new situations.

(iii)Perfective maintenance:

This type of maintenance is performed to improve the efficiency, performance, effectiveness and
maintainability of the system. This type of maintenance is not compulsory but changes in the
system are done just for perfection
Testing (Testing Techniques and Testing Strategies)

 Software testing is the process of executing a program with intension of finding errors in
the code. It is a process of evolution of system or its parts by manual or automatic means
to verify that it is satisfying specified or requirements or not.
 Generally, no system is perfect due to communication problems between user and
developer, time constraints, or conceptual mistakes by developer.
 To purpose of system testing is to check and find out these errors or faults as early as
possible so losses due to it can be saved.
 Testing is the fundamental process of software success.
 Testing is not a distinct phase in system development life cycle but should be applicable
throughout all phases i.e. design development and maintenance phase.
 Testing is used to show incorrectness and considered to success when an error is
detected.

OBJECTIVES OF SOFTWARE TESTING

The software testing is usually performed for the following objectives:-

SOFTWARE QUALITY IMPROVEMENT:- The computer and the software


are mainly used for complex and critical applications and a bug or fault in software
causes severe losses. So a great consideration is required for checking for quality of
software.

VERIFICATION AND VALIDATION:-

Verification means to test that we are building the product in right way .i.e. are
we using the correct procedure for the development of software so that it can meet
the user requirements.

Validation means to check whether we are building the right product or not.

SOFTWARE RELIABILTY ESTIMATION:- The objective is to discover the


residual designing errors before delivery to the customer. The failure data during process
are taken down in order to estimate the software reliability.

PRINCIPLES OF SOFTWARE TESTING

 Software testing is an extremely creative and challenging task. Some important principles
of software testing are as given:-

 All tests should be traceable to customer requirements.


 Testing time and resources should be limited i.e. avoid redundant testing.
It is impossible to test everything.
 Use effective resources to test.
 Test should be planned long before testing begins i.e. after requirement phase.
 Test for invalid and unexpected input conditions as well as valid conditions.
 Testing should begin in “in the small” and progress towards testing “in the large”.
 For the most effective testing should be conducted by an independent party.
Keep software static (without change meanwhile) during test.
 Document test cases and test results.
 Examining what the software not doing which it expected to do and also checking
what it is doing that was not expected to do.

STRATEGY FOR SOFTWARE TESTING


Different levels of testing are used in the test process; each level of testing aims to test different
aspects of the system.

 The first level is unit testing. In this testing, individual components are tested to
ensure that they operate correctly. It focuses on verification efforts.
 The second level is integration testing. It is a systematic technique for constructing
 The program structure. In this testing, many tested modules are combined into the
sub system which are then tested. The good here is to see if the modules can be
integrated properly.
 Third level is integration testing? System testing is actually a series of different tests
whose primary purpose is to fully exercise computer based system. These tests fall
outside scope of software process and are not conducted solely by software engineers.

Various Types of Reports/Modules

The System has various Modules:

 Institute
 Student
Institute Registration Screen: Various fields available on this screen will be:

 Login Name
 Institute Name
 Email Id
 Password
 Contact Number
Institute Login Screen: Various Fields available on this screen are:

 Login Name
 Password
Entering Questions: Various Fields are:

 Subject Name
 Question ID
 Questions
 Options (4)
 Correct Answer
Student Login Screen for Exam: Various Fields are:

 Student ID
 Student Name
 Exam Name
 Institute ID
Student Taking Exam Screen: Various Fields are:

 Display of question with options


 Control Buttons to switch questions
Result Displaying Screen: Various Fields are:

 Name of Student
 Student ID
 No. of unattempted questions.
 Total Marks.
 Result (Pass/Fail)
 Institute Name
 Exam Given

Future Scope of the Project

The website to conduct online exam is “Online Examination System”. This website provides
facility to institutes to conduct online exams by providing a unique ID to each institute. The
institute provides questions along with positive and negative marks. Institute also enters the list
of eligible students. All the information entered can be later edited by the institute.
In turn student can login with their id, name and institute ID to give the exams and can view
their result then and there. Institutes can also view the result of their students.

Online Examination System is being launched because a need for a destination that is
beneficial for both institutes and students. With this site, institutes can register and host online
exams. Students can give exams and view their results. This site is an attempt to remove the
existing flaws in the manual system of conducting exam
Conclusion

A website, ONLINEEXAMINATION, is to be designed to conduct online tests. Unlike other


online examination systems this website should not be just for the students; instead it should also
provide facility to Institutes to host online Tests/Exams. This will help institutes as:

 There will be no need to get new software every time to conduct an online test.
Also like other online websites, it will help students by:
 Saving the extra time of going too far away Exam Centre.
 Students need not wait for their results.
Also this website will remove the flaws of existing Manual Systems like:
 Reducing the manual labor (Decreases Overheads).
 Avoiding Mistakes Due To Human Error (Accurate).
 Will Increase Efficiency and Save Time.
 Will Allow Neat Handling Of Data Rather Than Error Prone Records.

The institutes will register themselves with a unique login name and password, the unique id
will be issued to the institutes by the website.
After login:
 They will enter exam details like number of questions.
 Then they will enter the questions along with the answers which can later be deleted and
edited.
 Also they will enter the list of eligible candidates with their id names which can also be
edited later.
 Institutes will be able to view the students list along with their respective results.

Bibliography/References

Books:
 C# in Depth
 ASP.Net in Simple Steps
 Database Management System by McGraw Hill
Websites:
 www.tutorialspoint.com
 www.W3Cschool.com

You might also like