Uploaded by 7011_Yash Vekariya

pooja

advertisement
ACKNOWLEDGEMENT
First of all, I would like to thank our college, “Shree G.K.& C.K. Bosamia Arts &
Commerce College,Jetpur” for giving us the opportunity to develop this project. I am
grateful to my project guide “Prof. Sachin Dave” for the guidance, inspiration and
constructive suggestions that helped me in the preparation of this project.
The satisfaction that accompanies that the successful completion of any task would
be incomplete without the mention of people whose ceaseless cooperation made it
possible, whose constant guidance and encouragement crown all efforts with success.
I want to thank a number of people at our institute for helping us to solve the
queries of subject related and finding the solution of various critical problems that we face
during developing this site.
I want to thank many of our faculties at our college for taking keen interest in this
project, helping us to solve many queries, suggesting guidelines, feedbacks and suggestions
to shape this project better.
Thanks to All.
Yours Sincerely,
Vekariya Pooja
PREFACE
I am the student of BCA SEM 6 from Shree G.K. & C.K. Bosamia Arts & Commerce
College, JETPUR. As per the Schedule of course of BCA the project work is compulsory for
every student in different government or private organization. So I have chosen the project
for Online News Channel named Daily News. I developed this project using Asp.Net as a
front End and SQL Server as a back end.
I have taken my website training of Daily News from Shree G.K. & C.K. Bosamia Arts
& Commerce College, JETPUR. I have noted all required information for My practice training
which were submitted to concerned person of college.
It’s great privilege for me to work for ‘Daily News-Online News Portal’ as a part of
our education. This has given us an opportunity to work in truly professional environment.
I prepared this report in ability of our knowledge and also there will be some mistake
and that is possible so please excuse us for that...
INDEX
S.No.
Topic
Page no
1
Introduction
1
2
Project Profile
3
3
System Development and Life Cycle
4
4
Analysis Requirement
9
5
Feasibility study
11
6
Hardware and software configuration
14
7
Flow chart
15
8
Bar chart
16
9
Time line chart
17
10
Gantt chart
18
11
Data Flow Diagram
19
12
Use case Diagram
30
13
Data Structure
32
14
Screen Layout and Body
45
15
Error and solution
67
16
Testing
69
17
Limitations
71
18
Conclusion
72
19
Reference
73
Daily News
INTRODUCTION
What is My Project?
Now a day we live in age of Information Communication and Technology. We can’t
think a single moment without technology. From morning to night, we need help of the
technology. This is the revolutionary time of computer technology. Most of the works
depends on web application.
For this reason, anytime, anywhere, anyone can access a website by internet at low
cost and we can find our expectable and most update information from website. At present
information is one the most valuable resource of the current world. We have developed our
project so that we can aware the people
Aim or Objective of My Project.
The objective of this project is to develop a web application for Online News Portal
Website that can aware the people
The objective of this project is to provide the daily news.
The objective of this project is to provide the breaking news.
It makes use of various technologies to get required crime oriented information more
Quickly, easily, colorfully and attractively.
To do this for more widely coverage of distribution and faster dissemination of
Information in a more timely manner.
Anytime, anywhere, anyone can know about the news or information by internet at
low cost.
Dynamically provides facility.
To add any new information without any complexity
Pooja Vekariya
1
Daily News
Advantages of my Project.

Useful For News Addicts

Just Register into our site and you can be able to read news across the world.

Users can read news as well as they can see videos of latest news.

User can easily find their favorite topic news because news is categorized into
Different categories.
Roles of User:
Admin:

Login

View, Add, Edit and Delete Admin

View, Add Edit and Delete Categories

View, Add, Edit and Delete Content

View, Add, Edit and Delete Video

View and Delete Feedback

View Users

Logout
Client:

Login

Registration

View Categories

View News Category wise

View News in Detailed

View Videos

Give Feedback

Logout
Pooja Vekariya
2
Daily News
PROJECT PROFILE
Project Title
Daily News – Online News Portal
Project Description
Daily News is used to get daily news updates category
wise
Frond End
ASP.NET
Back End
SQL SERVER
Project Guide
Sachin Dave
Developed By
Vekariya Pooja
Software
Visual Studio 2012
Submitted To
Shree G.K. & C.K. Bosamia Arts & Commerce
College,Jetpur
Submitted To
Pooja Vekariya
Saurashtra University,Rajkot
3
Daily News
SYSTEM DEVELOPMENT LIFE CYCLE
SDLC stands for Software Development Life Cycle. The software development life cycle
(SDLC) is a process by which software is developed and deployed. It is also called as
Software Development Process. The SDLC is the blueprint for the entire project.
A project manager can implement an SDLC process by following various models.
SDLC is a process followed for a software project, within a software organization.
It consists of a detailed plan describing how to develop, maintain, replace and alter or
enhance specific software.
It includes six common stages, which are: requirement gathering and analysis, software
design, coding and implementation, testing, deployment, and maintenance.
Planning
This is the first phase in the systems development process.
The Purpose of the first stage is making a plan about your software.
The purpose of this step is to also find out the scope of the problem and determine
solutions.
Pooja Vekariya
4
Daily News
Resources, costs, time, benefits and other items should be considered at this stage.
Planning for the quality assurance requirements and identification of the risks associated
with the project is also done in the planning stage.
Our Project Planning:
NO
PROJECT TASK
DAYS
STARTING
ENDING
DATE
DATE
1.
Requirement Gathering
6
5-Jan-22
10-Jan-22
2.
Requirement Analysis
5
11-Jan-22
15-Jan-22
3.
Feasibility Study
4
16-Jan-22
19-Jan-22
4.
Data Dictionary
2
20-Jan-22
21-Jan-22
5.
Data Table Design
7
22-Jan-22
28-Jan-22
6.
Data Flow Diagram:Admin &
5
29-Jan-22
02-Feb-22
Client
7.
Designing: Admin & Client
5
03-Feb-22
07-Feb-22
8.
Coding
25
08-feb-22
04-Mar-22
9.
Error & Solution
4
05-Mar-22
08-Mar-22
10.
Testing
3
09-Mar-22
11-Mar-22
11.
Implementation
4
12-Mar-22
15-Mar-22
12.
Limitations
2
16-Mar-22
17-Mar-22
13.
Conclusion
3
18 Mar-20
20-Mar-22
System Analysis & Requirement
The second phase is where we can consider as a requirement of our project & analysis the
system.
Requirement analysis is the most important and fundamental stage in SDLC.
A Software Requirement Specification (SRS) document, which specifies the software,
hardware, functional, and network requirements of the system is prepared at the end of this
phase.
Requirements analysis is critical to the success or failure of a systems or software project.
Pooja Vekariya
5
Daily News
This is done through an SRS (Software Requirement Specification) document which consists
of all the product requirements to be designed and developed during the project life cycle.
System Design
In Third Phase we have to start designing our system.
Based on the user requirements and the detailed analysis of a new system, the new system
must be designed. This is the phase of system designing.
The logical system design arrived at as a result of system analysis and is converted into
physical system design.
The logical design produced during the analysis is turned into a physical design - a detailed
description of what is needed to solve original problem.
Input, output, databases, forms, codification schemes and processing specifications are
drawn up in detail.
In the design phase, the programming language and the hardware and software platform in
which the new system will run are also decided.
Development
In Fourth phase, we can develop the system.
In this stage of SDLC the actual development starts and the product is built.
Developers must follow the coding guidelines defined by their organization and
programming tools like compilers, interpreters, debuggers, etc. are used to generate the
code.
Different high level programming languages such as C, C++, Pascal, Java and PHP are used
for coding.
The programming language is chosen with respect to the type of software being developed.
Integration & Testing
This phase involves the system integration & system testing.
This stage is usually a subset of all the stages as in the modern SDLC models, the testing
activities are mostly involved in all the stages of SDLC.
Pooja Vekariya
6
Daily News
This phase refers to the testing only stage of the product where product defects are
reported, tracked, fixed and retested, until the product reaches the quality standards
defined in the SRS.
After the code is generated, it is tested against the requirements to make sure that the
products are solving the needs addressed and gathered during the requirements stage.
During this stage, unit testing, integration testing, system testing, acceptance testing are
done.
The testing phase of the software development lifecycle (SDLC) is where you focus on
investigation and discovery.
During the testing phase, developers find out whether their code and programming work
according to customer requirements.
Before testing can begin, the project team develops a test plan.
Implementation
The sixth phase is Implementation which is used to write a majority code of program.
After having the user acceptance of the new system developed, the implementation phase
begins.
This phase comes after a complete understanding of system requirements and
specifications.
Implementation is the stage of a project during which theory is turned into practice.
The major steps involved in this phase are:
Acquisition and Installation of Hardware and Software
Conversion
User Training
Documentation
Maintenance
The last phase is Maintenance, when end user can fine tune the system, if they wish,
to boost performance, add new capabilities or meet additional user requirements.
Once when the client starts using the developed systems, then the real issues come
up and requirements to be solved from time to time.
Pooja Vekariya
7
Daily News
This procedure where the care is taken for the developed product is known as
maintenance.
Maintenance is necessary to eliminate errors in the system during its working life
and to tune the system to any variations in its working environments.
It has been seen that there are always some errors found in the systems that must
be noted and corrected. It also means the review of the system from time to time.
The review of the system is done for:
Knowing the full capabilities of the system
Knowing the required changes or the additional requirements
Studying the performance.
Pooja Vekariya
8
Daily News
ANALYSIS REQUIREMENT
Requirement Analysis, also known as Requirement Engineering, is the process of defining
user expectations for new software being built or modified.
Requirements analysis is critical to the success or failure of a systems or software project.
The requirements should be documented, actionable, measurable, testable, traceable,
related to identified business needs or opportunities, and defined to a level of detail
sufficient for system design.
Requirement analysis is significant and essential activity after elicitation.
We analyze, refine, and scrutinize the gathered requirements to make consistent and
unambiguous requirements.
This activity reviews all requirements and may provide a graphical view of the entire system.
After the completion of the analysis, it is expected that the understand ability of the project
may improve significantly.
Reference Sites:
https://www.News18.com/
http://www.sandeshnews.com/
http://www.AajTak.com
Basic Functionality of Project:
Client:

Login

Registration

View Category

View News

View Videos

Give Feedback
Pooja Vekariya
9
Daily News
Admin:

Login

View, Add, Edit and Delete Admin

View, Add Edit and Delete Categories

View, Add, Edit and Delete Content
 View, Add, Edit and Delete Video

View and Delete Feedback

View Users

Logout

India

World

Tech

Sports

Corona

Bollywood
Category:
Pooja Vekariya
10
Daily News
FEASIBILITY STUDY
What Is Feasibility Study?
A feasibility study starting a new analysis that takes all of a project’s relevant factors
into account including economical, technical, legal and scheduling consideration to the
completing the project successfully.
Feasibility study is important to conduct a feasibility will be successful.
things to be included are plan, cost and sources of manpower and personnel
requirements, market and profitability.
There are many types of feasibility study:
Technical Feasibility Study
Technical feasibility is technologies and capabilities of project are considered in
fulfilled with our services.
Project Technology
ASP.NET:- Page layout has been designed all the forms & logic has been written in ASP.NET.
All the validation is task developed in ASP.NET.
SQL SRVER: - SQL Server has been used as database for the project.
Project Software
Visual studio 2012
Firefox.Chrome 2
Schedule Feasibility Study
Schedule Feasibility study most important feasibility to give time to project, strategy,
plan to the process is realistic and achievable.
Pooja Vekariya
11
Daily News
PROJECT PLANNER
NO
PROJECT TASK
DAYS
STARTING
ENDING
DATE
DATE
1.
Requirement Gathering
6
5-Jan-22
10-Jan-22
2.
Requirement Analysis
5
11-Jan-22
15-Jan-22
3.
Feasibility Study
4
16-Jan-22
19-Jan-22
4.
Data Dictionary
2
20-Jan-22
21-Jan-22
5.
Data Table Design
7
22-Jan-22
28-Jan-22
6.
Data Flow Diagram:Admin &
5
29-Jan-22
02-Feb-22
Client
7.
Designing: Admin & Client
5
03-Feb-22
07-Feb-22
8.
Coding
25
08-feb-22
04-Mar-22
9.
Error & Solution
4
05-Mar-22
08-Mar-22
10.
Testing
3
09-Mar-22
11-Mar-22
11.
Implementation
4
12-Mar-22
15-Mar-22
12.
Limitations
2
16-Mar-22
17-Mar-22
13.
Conclusion
3
18 Mar-20
20-Mar-22
3. Economical Feasibility Study
Economical Feasibility studies our projects economical state buying specification the
financial resources of the company.
Our project is also low cost because no need to attach extra hardware, organization
is ready to invest in system.
Profit is website release and uses login/ subscribe so money colleting.
Hardware
Hardware Name
Price
Monitor
5000/-
Keyboard
1500/-
Pooja Vekariya
12
Daily News
Mouse
500/-
CPU
10000/-
Ram GB
8702/-
Hard Disk
5000/-
4. Resource Feasibility Study
Do you have enough resource what resource will be required facilities will be required for
the project.
Hardware
Operating System
Windows 7
Type
64 Bit
Processor
Intel (B) Core (TM) I3
2100 CPU @ 3.10 GHZ
RAM
4.00 GB
Software
Visual Studio 2012
Firefox
Chrome
5. Operational Feasibility Study
This measures how company will be able to solve problems and take advantage of
opportunities that are presented during the course of the project.
Our project will work property like registration login and payment.
It has been developed with security levels of admin and client site.
Pooja Vekariya
13
Daily News
HARDWARE & SOFTWARE CONFIGURATION
Hardware:Processor
Intel Core i3
RAM
4 GB
Hard disk
500 GB
Monitor, Keyboard, Mouse
Software:Operating System
Window 7
Front End
Asp.Net Visual Studio 2012(using c#)
Back End
SQL server
Browser
Chrome, Mozilla Firefox
Document
Word, Excel
Pooja Vekariya
14
Daily News
FLOW CHART
Start
Admin
Client
No
No
Login
Registration
Yes
Yes
Add Admin
Login
Add Category
Homepage
Add Content
View Category
Add Video
View News
View News Details
View Users
View Videos
View Feedback
Feedback
Logout
End
Pooja Vekariya
15
Daily News
BAR CHART
14
13
12
11
10
9
8
Starting Date
7
Days
6
5
4
3
2
1
20-Nov-2110-Dec-2130-Dec-21 19-Jan-22 8-Feb-22 28-Feb-2220-Mar-22 9-Apr-22
Pooja Vekariya
16
Daily News
TIME LINE CHART
Starting Date
9-Apr-22
20-Mar-22
28-Feb-22
8-Feb-22
19-Jan-22
30-Dec-21
Starting Date
10-Dec-21
20-Nov-21
Pooja Vekariya
17
Daily News
GANNT CHART
14
13
12
11
10
9
8
Starting Date
7
Days
6
5
4
3
2
1
20-Nov-2110-Dec-2130-Dec-21 19-Jan-22 8-Feb-22 28-Feb-2220-Mar-22 9-Apr-22
Pooja Vekariya
18
Daily News
Data Flow Diagram
What is Data Flow Diagram?
Data flow diagrams are used to graphically represent the flow of data in a business
information system. It is also known as DFD.
DFD describes the processes that are involved in a system to transfer data from the
input to the file storage and reports generation.
Data flow diagrams can be divided into Logical and Physical.
The Logical data flow diagram describes flow of data through a system to perform
certain functionality of a business.
The Physical data flow diagram describes the implementation of the logical data flow.
Pooja Vekariya
19
Daily News
Admin
Client
Login
Add, Edit Delete Videos
Registration
View About Us
View Categories
View News
View Videos
Daily
News
Add, Edit Delete Category
Add, Edit Delete News
Add, Edit Delete Admin
View Feedback
View Users
Pooja Vekariya
20
Daily News
Admin

0(Zero) Level:
Category
Management
Feedback
News Management
Management
Daily
News
User
Video
Management
Management
Login
Management
Pooja Vekariya
21
Daily News
Admin

1st Level:
Add Edit
View Delete
Category
Add Edit
Add Edit
1.0
Category
2.0
admin
3.0
content
Category
View Delete
admin
View Delete
content
Admin
Add Edit
4.0
Videos
5.0
Feedback
Pooja Vekariya
View Delete
View Delete
videos
Feedback
22
Daily News
Admin

2nd Level DFD
Admin
Login
Request
1.0
Login
1.1
Add
Category
1.2
Edit
Category
Check Login
Insert
Admin
Category
Data
Update
Category
Data
1.3
Delete
Category
Remove
Data
Category
Show
1.4
View
Category
Pooja Vekariya
Data
Category
23
Daily News
Admin

2nd Level DFD
Admin
Login
Request
3.0
Login
3.1
Add
Content
3.2
Edit
Content
Check Login
Insert
Admin
Content
Data
Update
Content
Data
3.3
Delete
Content
Remove
Data
Content
Show
3.4
View
Content
Pooja Vekariya
Data
Content
24
Daily News
Admin

2nd Level DFD
Admin
Login
Request
4.0
Login
4.1
Add
Video
4.2
Edit
Video
Check Login
Insert
Admin
Video
Data
Update
Video
Data
4.3
Delete
Video
Remove
Data
Video
Show
4.4
View
Video
Pooja Vekariya
Data
Video
25
Daily News
Admin

2nd Level DFD
Admin
Login
Request
5.0
Login
5.1
View
Users
5.
View
Feedback
Pooja Vekariya
Check
Login
Vie
w
Vie
w
Admin
Registration
Feedback
26
Daily News
Client

0 Level DFD
Register
User
Login
Enter Username &
Password
Check
User
Login
Registration
Registration
Open
Home
Page
Pooja Vekariya
27
Daily News
Client

1st Level DFD
Client
Select
Category
Detail
Register
Here
Insert
Give
Feedback
Pooja Vekariya
Category
Show
Insert
Registration
Feedback
28
Daily News
Client

2nd Level DFD
User
Registration
Response
Login
View
Category
View
News
View
Video
Pooja Vekariya
Registration
Registration
Category
content
video
29
Daily News
USE CASE DIAGRAM
Login
Registration
Select
Category
View News
View
Videos
Give
Feedback
Client
Pooja Vekariya
Logout
30
Daily News
Login
Add Admin
Add Category
Add
Content
Add Video
View Users
Admin
View Feedback
Logout
Pooja Vekariya
31
Daily News
DATA STRUCTURE
A Data Dictionary is a collection of names, definitions, and attributes about data elements
that are being used or captured in a database, information system, or part of a research
project.
A data dictionary contains metadata i.e. data about the database.
The metadata included in a Data Dictionary can assist in defining the scope and
characteristics of data elements, as well the rules for their usage and application.
The data dictionary is very important as it contains information such as what is in the
database, who is allowed to access it, where is the database physically stored etc.
The users of the database normally don't interact with the data dictionary; it is only handled
by the database administrators.
Admin:
Field
data type
Constraint
Specification
A_id
int
Primary key
This field is used to define user id.
A_unm
Varchar (10)
Not Null
It is used to input user name.
A_pwd
Varchar (10)
Not Null
It is used to input password.
Register:
Field
Data type
Constraint
specification
r_id
int
Primary key
This field is used to define user id.
r_fnm
Varchar (15)
Not Null
It is used to input first name.
r_lnm
Varchar (15)
Not Null
It is used to input last name.
r_email
Varchar (max)
Not Null
It is used to input first name.
r_pwd
Varchar (15)
Not Null
It is used to input last name.
Pooja Vekariya
32
Daily News
Category:
Field
Data type
Constraint
Specification
c_id
Integer (5)
Primary key
This field is used to define user id.
c_name
Varchar (40)
Not Null
It is used to input user name.
Feedback:
Field
Data type
Constraint
Specification
f_Id
Integer
Primary key
It is used to define id.
f_name
Varchar (30)
Not null
It is used to define user name.
f_email
Varchar(30)
Not null
It is used to define email address.
f_sub
Varchar 200)
Not null
It is used to type subject
Not Null
It is Used To store User’s message
f_msg
Text
Video
Field
Data type
Constraint
Specification
v_Id
int
Primary key
It is used to define id.
v_title
Varchar (max)
Not null
It is used to define video title.
v_video
text
Not null
It is used to store path of the video.
c_id
int
Foreign Key
It is used to store category of the
video
Pooja Vekariya
33
Daily News
Content
Field
Data type
Constraint
Specification
co_Id
Int
Primary key
It is used to define id.
co_headline
Varchar (max)
Not null
It is used to store News Headline.
co_des
text
Not null
It is used to store News in Details
co_date
NVarchar(14)
Not null
It is used to store date of the news
co_time
Nvarchar(14)
Not Null
It is used to store time of the news
co_photo
Text
Not Null
It is used to store image path
c_id
Int
Foreign Key
It is used to store category for
news
Pooja Vekariya
34
Daily News
SCREEN LAYOUT AND CODING
Client
Home Page
Pooja Vekariya
35
Daily News
About Us Page
Login Page
Pooja Vekariya
36
Daily News
Register Page
Contact us page
Pooja Vekariya
37
Daily News
News Page
News detail page
Pooja Vekariya
38
Daily News
Videos Page
Pooja Vekariya
39
Daily News
Admin Screen Layout
Login Page
Admin Page
Pooja Vekariya
40
Daily News
Category Page
User’s Feedback Page
Pooja Vekariya
41
Daily News
Users Page
View Video Page
Pooja Vekariya
42
Daily News
Add Video Page
View Content Page
Pooja Vekariya
43
Daily News
Content Page
Pooja Vekariya
44
Daily News
CODING
Default.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="Default2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="main">
<div class="content"><div class="ic"></div>
<div class="container_12"><div class="grid_12">
<div class="flexslider"><ul class="slides">
<li><img src="images/world.jpg" alt="" style="width:595px;height:310px">
<div class="flex-caption"><p>World</p></div>
</li><li><img src="images/sports.jpg" alt="" style="width:595px;height:310px">
<div class="flex-caption c2">
<p>Sports</p>
</div>
</li>
<li><img src="images/tech.jpg" alt="" style="width:595px;height:310px">
<div class="flex-caption">
<p>Tech</p>
</div></li></ul></div>
<span id="responsiveFlag"></span></div>
<div class="clear"></div>
<div class="grid_12"><br /><br />
<h3>Select Your Favourite Category</h3>
<div id="owl">
<asp:DataList ID="DataList1" runat="server" DataKeyField="c_id" DataSourceID="SqlDataSource1"
RepeatDirection="Horizontal">
<ItemTemplate> <div class="item">
<asp:Label ID="c_idLabel" runat="server" Text='<%# Eval("c_id") %>' Visible="false" /><a
href='news.aspx?c_id=<%# Eval("c_id") %>'><img src="images/user.png" alt=""
style="height:100px;width:100px"><br />
<%# Eval("c_name") %></a>
             </div>
</ItemTemplate>
<AlternatingItemTemplate>
<div class="item it1">
<asp:Label ID="c_idLabel" runat="server" Text='<%# Eval("c_id") %>' Visible="false" /><a
Pooja Vekariya
45
Daily News
href='news.aspx?c_id=<%# Eval("c_id") %>'><img src="images/user.png" alt=""
style="height:100px;width:100px"><br /><%# Eval("c_name") %></a>
            </div>
</AlternatingItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [category]"></asp:SqlDataSource>
/div></div>
<h3>About Us</h3>
<asp:DataList ID="DataList2" runat="server" DataKeyField="co_id" DataSourceID="SqlDataSource2"
RepeatColumns="2" RepeatDirection="Horizontal">
<ItemTemplate>
<div class="grid_6 prefix_1">
<img src='<%# ResolveClientUrl("~/upload/") %><%# Eval("co_photo") %>' alt="" class="img_inner fleft"
style="height:120px;width:220px">
<asp:Label ID="co_idLabel" runat="server" Text='<%# Eval("co_id") %>' Visible="false" /><div
class="extra_wrapper">
<%# Eval("co_headline") %>
</div><div class="clear"></div>
<div class="alright"><a href='news_detail.aspx?co_id=<%# Eval("co_id") %>' class="btn">Read
More</a></div>
<br /></div></ItemTemplate></asp:DataList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [content] ORDER BY [co_id]
DESC"></asp:SqlDataSource>
</div> </div> </div></asp:Content>
About_us.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="about.aspx.cs" Inherits="about" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content"><div class="ic"></div><div class="container_12">
<div class="grid_12"><br /><h3>About Daily News</h3><br />
<img src="images/page4_img1.jpg" alt="" class="img_inner fleft">
<div class="extra_wrapper"><br />
Pooja Vekariya
46
Daily News
<p class="p1 col1">Besides its exacting journalistic standards, Daily News Group is also distinguished by its
constant innovation, reinvention and embrace of new technologies. It has an integrated, state-of-the-art
newsroom which feeds editorial content seamlessly across its television, print, mobile, social media and digital
entities, adding up to a massive cumulative reach.</p>
<p class="p2"><br />
We live in a world of too much information and too little context. Too much noise and too little insight. And so
Daily News journalists candidly shepherd audiences through politics and policy, business and pop culture, food,
science, and everything else that matters. You can find our work wherever you live on the internet.
</p></div>
<div class="clear"></div><br />
Daily News will serve robust and high quality news from every corner of India and relevant global news from
world, the world's news leader, on the same platform with an aim to provide the discerning viewers with a
complete commitment to the needs and aspirations of the Indian viewer, while Daily News International will
continue to deliver global news to Indian viewers.
</div></div></div></asp:Content>
Contact.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="contact.aspx.cs" Inherits="contact" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="main"><div class="content"><div class="ic"></div><div class="container_12"
style="width:350px;">
<center><h3>Contact Form</h3><div class="success_wrapper">
<div class="success-message">
<asp:Label ID="Label1" runat="server" ForeColor="red"></asp:Label>
<br /></div></div><label>
<asp:TextBox ID="txt_fnm" runat="server" placeholder="Full Name"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_fnm"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ErrorMessage="Only
Alphabet allowed in fullname" ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_fnm" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="[A-Za-z ]{2,20}">
</asp:RegularExpressionValidator></label>
<label><asp:TextBox ID="txt_email" runat="server" Placeholder="Email"></asp:TextBox>
Pooja Vekariya
47
Daily News
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_email"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Invalid
Email id" ValidationGroup="group1" SetFocusOnError="True" ControlToValidate="txt_email"
Display="Dynamic" ForeColor="#FF3300" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([.]\w+)*"></asp:RegularExpressionValidator></label>
<label><asp:TextBox ID="txt_sub" runat="server" Placeholder="Subject"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txt_sub"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Only
Alphabet allowed in fullname" ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_sub" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="[A-Za-z0-9
]{2,100}"></asp:RegularExpressionValidator></lab
<label><asp:TextBox ID="txt_msg" runat="server" Placeholder="Message"
TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txt_msg"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator> </la
<div><div class="clear"></div>
<asp:Button ID="Button1" runat="server" Text="SEND" OnClick="Button1_Click"
ValidationGroup="group1"></asp:Button>
</div></center></div> </div></div></asp:Content>
Contact.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class contact : System.Web.UI.Page
Pooja Vekariya
48
Daily News
{
SqlConnection cn;
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void Button1_Click(object sender, EventArgs e)
{
cn.Open();
cmd = new SqlCommand("Insert into feedback(f_fnm,f_email,f_sub,f_msg) values ('" + txt_fnm.Text + "','"
+ txt_email.Text + "','" + txt_sub.Text + "','"+txt_msg.Text+"')", cn);
int id = cmd.ExecuteNonQuery();
if (id > 0)
{
Label1.Text = "Thank you For Your valueable feedback";
}
else
{
Label1.Text = "Error While Inserting Your Feedback";
}
cn.Close();
}}
Login.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="login.aspx.cs" Inherits="login" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="main">
<div class="content"><div class="ic"></div>
<div class="container_12"><center>
<h3>Login To Our Site</h3>
<div class="success_wrapper">
<div class="success-message">
<asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label>
Pooja Vekariya
49
Daily News
</div>
</div>
<label>
<asp:TextBox ID="txt_email" runat="server" placeholder="Enter Your Email Id"
TextMode="Email"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_email"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<br /><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ErrorMessage="Invalid Email id" ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_email" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="\w+([+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></label><br />
<label><asp:TextBox ID="txt_pwd" runat="server" Placeholder="Enter Your Password"
TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txt_pwd" Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator><br />
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Only [A-zaz0-9*#@] allowed between 5 to 15 character " ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_pwd" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="^[A-za-z09*#@]{5,15}"></asp:RegularExpressionValidator></label><br />
<div><div class="clear"></div>
<asp:Button ID="Button1" runat="server" Text="LOGIN" OnClick="Button1_Click"
ValidationGroup="group1"></asp:Button></div>
New To Our Site? <asp:LinkButton ID="LinkButton1" runat="server" ForeColor="BlueViolet"
OnClick="LinkButton1_Click">Register Here</asp:LinkButton>
</center> </div></div></div></asp:Content>
Login.aspx.cs
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class login : System.Web.UI.Page
{
SqlConnection cn;
SqlDataAdapter da;
DataTable dt;
protected void Page_Load(object sender, EventArgs e)
{ cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
Pooja Vekariya
50
Daily News
protected void Button1_Click(object sender, EventArgs e)
{
da = new SqlDataAdapter("select * from register where r_email = '" + txt_email.Text + "' and r_pwd= '" +
txt_pwd.Text + "'", cn);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Session["u_id"] = dt.Rows[0][0].ToString();
Session["user"] = dt.Rows[0][1].ToString();
Response.Redirect("Default.aspx");
}
else
{
Label1.Text = "Invalid username or password";
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("register.aspx");
}}
Register.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="register.aspx.cs" Inherits="register" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="main">
<div class="content"><div class="ic"></div>
<div class="container_12" style="width:350px;">
<center>
<h3>Create Account</h3>
<div class="success_wrapper">
<div class="success-message">
<asp:Label ID="Label1" runat="server" ForeColor="Maroon"></asp:Label></div>
</div><label>
<asp:TextBox ID="txt_fnm" runat="server" placeholder="Firstname"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_fnm"
Pooja Vekariya
51
Daily News
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ErrorMessage="Only
Alphabet allowed in firstname" ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_fnm" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="[A-Za-z ]{2,10}">
</asp:RegularExpressionValidator></label><br />
<label><asp:TextBox ID="txt_lnm" runat="server" Placeholder="Lastname"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_lnm"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Only
Alphabet allowed in lastname" ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_lnm" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="[A-Za-z ]{2,10}">
</asp:RegularExpressionValidator></label><br />
<label><asp:TextBox ID="txt_email" runat="server" placeholder="Enter Your Email Id"
TextMode="Email"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txt_email"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Invalid
Email id" ValidationGroup="group1" SetFocusOnError="True" ControlToValidate="txt_email"
Display="Dynamic" ForeColor="#FF3300" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([.]\w+)*"> </asp:RegularExpressionValidator></label><br />
<label><asp:TextBox ID="txt_pwd" runat="server" Placeholder="Enter Your Password"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txt_pwd"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Only [A-zaz0-9*#@] allowed between 5 to 15 character " ValidationGroup="group1" SetFocusOnError="True"
ControlToValidate="txt_pwd" Display="Dynamic" ForeColor="#FF3300" ValidationExpression="^[A-za-z09*#@]{5,15}"></asp:RegularExpressionValidator>/label><br /><div>
<div class="clear"></div><asp:Button ID="Button1" runat="server" Text="Register" OnClick="Button1_Click"
ValidationGroup="group1"></asp:Button>
</div></center> </div></div></div></asp:Content>
Register.aspx.cs
Pooja Vekariya
52
Daily News
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class register : System.Web.UI.Page
{
SqlConnection cn;
SqlCommand cmd;
SqlDataAdapter da;
DataTable dt;
protected void Page_Load(object sender, EventArgs e)
{
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void Button1_Click(object sender, EventArgs e)
{
da = new SqlDataAdapter("select * from register where r_email='"+txt_email.Text+"'",cn);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Label1.Text = "This email id is already registered";
}
else
{
cn.Open();
cmd = new SqlCommand("Insert into register(r_fnm,r_lnm,r_email,r_pwd) values ('" + txt_fnm.Text +
"','" + txt_lnm.Text + "','" + txt_email.Text + "','" + txt_pwd.Text + "')", cn);
int id = cmd.ExecuteNonQuery();
if (id > 0)
{
Response.Redirect("login.aspx");
}
else
{
Label1.Text = "Error while Inserting registration";
}
cn.Close();
Pooja Vekariya
53
Daily News
} }}
News.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="news.aspx.cs" Inherits="news" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="main"><div class="content"><div class="ic"></div>
<div class="container_12"><div class="grid_12"><h2>Latest News</h2>
<asp:DataList ID="DataList1" runat="server" DataKeyField="co_id" DataSourceID="SqlDataSource1"
RepeatDirection="Horizontal">
<ItemTemplate>
<div class="blog">
<img src='<%# ResolveClientUrl("~/upload/") %><%# Eval("co_photo") %>' alt="" class="img_inner fleft"
style="height:250px;width:400px">
<div class="blog_info">
<time> <asp:Label ID="co_timeLabel" runat="server" Text='<%# Eval("co_date") %>' /></time>
<div id="user"> <asp:Label ID="Label1" runat="server" Text='<%# Eval("co_time") %>' />
</div>
<p class="col1"><a href='news_detail.aspx?<%# Eval("co_id") %>'>
<asp:Label ID="co_headlineLabel" runat="server" Text='<%# Eval("co_headline") %>' />
/a></p></div>
<a href='news_detail.aspx?co_id=<%# Eval("co_id") %>' class="btn">Read More</a>
<asp:Label ID="co_idLabel" runat="server" Text='<%# Eval("co_id") %>' Visible="false" />
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [co_headline], [co_id], [co_date],
[co_time], [co_photo] FROM [content] WHERE ([c_id] = @c_id)">
<SelectParameters>
<asp:QueryStringParameter Name="c_id" QueryStringField="c_id" Type="Int32" />
</SelectParameters> </asp:SqlDataSource> </div></div></div></div> </asp:Content>
News_detail.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/client.master" AutoEventWireup="true"
CodeFile="news_detail.aspx.cs" Inherits="news_detail" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="main"><div class="content"><div class="ic"></div>
Pooja Vekariya
54
Daily News
<div class="container_12"><div class="grid_12"><h2>Latest News</h2>
<asp:DataList ID="DataList1" runat="server" DataKeyField="co_id" DataSourceID="SqlDataSource1"
RepeatDirection="Horizontal">
<ItemTemplate>
<div class="blog"><p class="col1">
<asp:Label ID="co_headlineLabel" runat="server" Font-Size="XX-Large" ForeColor="Black" Text='<%#
Eval("co_headline") %>' /></p>
<img src='<%# ResolveClientUrl("~/upload/") %><%# Eval("co_photo") %>' alt="" class="img_inner fleft"
style="height:450px;width:900px">
</div><div class="blog_info">
<time> <asp:Label ID="co_timeLabel" runat="server" Text='<%# Eval("co_date") %>' /></time>
<div id="user"><asp:Label ID="Label1" runat="server" Text='<%# Eval("co_time") %>' /></div>
</div><%# Eval("co_des") %>
<br></ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [content] WHERE ([co_id] =
@co_id)">
<SelectParameters>
<asp:QueryStringParameter Name="co_id" QueryStringField="co_id" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
/div></div></div></div></asp:Content>
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="admin_Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>
<body style="background-image:url('images/bg.jpg')">
<form id="form1" runat="server">
<div><div id="contents" style="background:none;"> <center>
<asp:Panel ID="Panel1" runat="server" Width="400px" Style=" border-radius:5px 5px 5px;border:solid 1px
#FF9900;padding:10px 10px 10px 10px;margin-top:200px;line-height:3;background:rgba(0,0,0,0.3);">
<asp:Label ID="Label1" runat="server" Text="Admin Login" Font-Bold="true" Font-Size="XX-Large"
Pooja Vekariya
55
Daily News
ForeColor="White"></asp:Label><br />
<center><asp:Label ID="Label2" runat="server" Text="" ForeColor="Red"> </asp:Label>
</center><asp:TextBox ID="TextBox1" runat="server" Width="350px" placeholder="Username">
</asp:TextBox><br />
<asp:TextBox ID="TextBox2" runat="server" Width="350px" placeholder="Password"
TextMode="Password"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" Text="Login" Width="137px" BackColor="#CC9900" FontBold="True" Font-Size="Medium" OnClick="Button1_Click" />
</asp:Panel></center></div></div></form></body></html>
Default.aspx.cs
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class admin_Default : System.Web.UI.Page
{
SqlConnection cn;
SqlDataAdapter da;
DataTable dt;
protected void Page_Load(object sender, EventArgs e)
{
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void Button1_Click(object sender, EventArgs e)
{
da = new SqlDataAdapter("select * from admin where a_unm = '" + TextBox1.Text + "' and a_pwd= '" + TextBox2.Text
+ "'", cn);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Session["a_id"] = dt.Rows[0][0].ToString();
Response.Redirect("admin.aspx");
}
else
{
Label2.Text = "Invalid username or password";
} }}
Pooja Vekariya
56
Daily News
Admin.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true"
CodeFile="admin.aspx.cs" Inherits="admin_admin" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="contents"><div class="background">
<center><asp:Label ID="Label1" runat="server" Text="" ForeColor="Red" Font-Bold="true">
</asp:Label></center>
<asp:Panel ID="Panel1" runat="server" BackColor="#3B2D1D" Style=" border-radius:5px 5px 5px;border:solid
1px #FF9900;padding:10px 10px 10px 10px">
<h4>Add New Admin
<asp:TextBox ID="TextBox1" runat="server" Width="250px" placeholder="Username"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
 <asp:TextBox ID="TextBox2" runat="server" Width="250px" placeholder="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
 <asp:Button ID="Button1" runat="server" Text="ADD" Width="137px" OnClick="Button1_Click"
ValidationGroup="group1" /><br />
<center><h4><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ErrorMessage="Only (A-za-z0-9) allowed between 5 to 15 character in username" ValidationGroup="group1"
SetFocusOnError="True" ControlToValidate="TextBox1" Display="Dynamic" ForeColor="#FF3300"
ValidationExpression="[A-Za-z0-9]{5,15}"></asp:RegularExpressionValidator></h4>
<h4><asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Only
[A-za-z0-9*#@] allowed between 5 to 15 character in password" ValidationGroup="group1"
SetFocusOnError="True" ControlToValidate="TextBox2" Display="Dynamic" ForeColor="#FF3300"
ValidationExpression="^[A-za-z0-9*#@]{5,15}"></asp:RegularExpressionValidator></h4> </center>
</asp:Panel><br /><br /><center><h1>List Of Category</h1></center>
<asp:Panel ID="Panel2" runat="server" BackColor="#3B2D1D" Style=" border-radius:5px 5px 5px;border:solid
1px #FF9900;padding:10px 0px 10px 0px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="a_id"
DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" HorizontalAlign="Center"
Width="900px" GridLines="Horizontal" OnRowCommand="GridView1_RowCommand"
OnRowUpdating="GridView1_RowUpdating">
<AlternatingRowStyle BackColor="#3B2D1D" />
<Columns>
Pooja Vekariya
57
Daily News
<asp:TemplateField HeaderText="Id" InsertVisible="False" SortExpression="a_id">
<EditItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("a_id") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("a_id") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Username" SortExpression="a_unm">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("a_unm") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("a_unm") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" /><ItemStyle Width="350px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Password" SortExpression="a_pwd">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("a_pwd") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate><asp:Label ID="Label3" runat="server" Text='<%# Bind("a_pwd")
%>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle Width="350px" /></asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
Text="Update"></asp:LinkButton>
 <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
Text="Edit"></asp:LinkButton>
 <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandArgument='<%#
Pooja Vekariya
58
Daily News
Eval("a_id") %>' CommandName="Delete" Text="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView></asp:Pan
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM
[admin]"></asp:SqlDataSource><p><asp:Content>
Admin.aspx.cs
public partial class admin_admin : System.Web.UI.Page
{
SqlConnection cn;
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void Button1_Click(object sender, EventArgs e)
{
cn.Open();
cmd = new SqlCommand("Insert into admin (a_unm,a_pwd) values ('" + TextBox1.Text + "','" +
TextBox2.Text + "')", cn);
int id = cmd.ExecuteNonQuery();
if (id > 0)
{
Label1.Text = "New Category Successfully Inserted";
}
else
{
Label1.Text = "Error while Inserting New Category";
}
cn.Close();
Response.Redirect("admin.aspx");
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
Pooja Vekariya
59
Daily News
GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
Label id = (Label)GridView1.Rows[e.RowIndex].Cells[0].FindControl("Label1");
TextBox name = (TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("TextBox1");
TextBox pwd = (TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("TextBox2");
cn.Open();
cmd = new SqlCommand("update admin set a_unm='" + name.Text + "',a_pwd='"+pwd.Text+"' where
a_id='" + Convert.ToInt32(id.Text) + "'", cn);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("admin.aspx");
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.ToString() == "Delete")
{
int id = Convert.ToInt32(e.CommandArgument.ToString());
cn.Open();
cmd = new SqlCommand("delete from admin where a_id='" + id + "'", cn);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("admin.aspx");
} }}
Category.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true"
CodeFile="category.aspx.cs" Inherits="admin_category" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="contents"><div class="background">
<center><asp:Label ID="Label1" runat="server" Text="" ForeColor="Red" FontBold="true"></asp:Label></center>
<asp:Panel ID="Panel1" runat="server" BackColor="#3B2D1D" Style=" border-radius:5px 5px 5px;border:solid
1px #FF9900;padding:10px 10px 10px 10px">
<h4>Add New Category
<asp:TextBox ID="TextBox1" runat="server" Width="446px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
Pooja Vekariya
60
Daily News
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="ADD" Width="137px" ValidationGroup="group1"
OnClick="Button1_Click" /><br /></h4>
<center><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ErrorMessage="Only (A-za-z0-9 ) allowed between 5 to 15 characters in category name"
ValidationGroup="group1" SetFocusOnError="True" ControlToValidate="TextBox1" Display="Dynamic"
ForeColor="#FF3300" ValidationExpression="[A-Za-z0-9
]{5,15}"></asp:RegularExpressionValidator></asp:Panel><br /><br />
<center><h1>List Of Category</h1></center>
<asp:Panel ID="Panel2" runat="server" BackColor="#3B2D1D" Style=" border-radius:5px 5px 5px;border:solid
1px #FF9900;padding:10px 0px 10px 0px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="c_id"
DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" HorizontalAlign="Center"
Width="900px" GridLines="Horizontal" OnRowCommand="GridView1_RowCommand">
<AlternatingRowStyle BackColor="#3B2D1D" />
<Columns>
<asp:TemplateField HeaderText="Id" InsertVisible="False" SortExpression="c_id">
<EditItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("c_id") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("c_id") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Category Name" SortExpression="c_name">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("c_name") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("c_name") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle Width="700px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
Pooja Vekariya
61
Daily News
<EditItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
Text="Update"></asp:LinkButton>
 <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
Text="Edit"></asp:LinkButton>
 <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandArgument='<%#
Eval("c_id") %>' CommandName="Delete" Text="Delete"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView> </asp:Panel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM
[category]"></asp:SqlDataSource></p></div></div> </asp:Content>
Content.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true"
CodeFile="content.aspx.cs" Inherits="admin_content" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="contents"><div class="background">
<center><asp:Label ID="Label1" runat="server" Text="" ForeColor="Red" Font-Bold="true"></asp:Label><br
/><br />
<asp:Panel ID="Panel1" runat="server" BackColor="#3B2D1D" Style=" border-radius:5px 5px 5px;border:solid
1px #FF9900;padding:10px 10px 10px 10px" Width="600px" HorizontalAlign="Left">
<center><h2>Add New News Article</h2></center> <br />
<asp:TextBox ID="txt_head" runat="server" Width="570px" placeholder="Headline of the
News"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_head"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<br /><asp:TextBox ID="txt_des" runat="server" Width="570px" Placeholder="Description of the News"
TextMode="MultiLine" Height="300px"></asp:TextBox>
Pooja Vekariya
62
Daily News
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_des"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator> <br />
<asp:TextBox ID="txt_date" runat="server" Width="570px" TextMode="Date"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txt_date"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator><br />
<asp:TextBox ID="txt_time" runat="server" Width="570px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txt_time"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator><br />
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="FileUpload1"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<br /><asp:DropDownList ID="ddl_cat"
runat="server" DataSourceID="SqlDataSource1" DataTextField="c_name" DataValueField="c_id"
Width="580px"></asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM
[category]"></asp:SqlDataSource><br />
<center><asp:Button ID="Button1" runat="server" Text="ADD" Width="137px" OnClick="Button1_Click"
ValidationGroup="group1" /></center>
</asp:Panel></center></div></div></asp:Content> }
View_ Content Page
protected void Page_Load(object sender, EventArgs e){
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
Label id = (Label)GridView1.Rows[e.RowIndex].Cells[0].FindControl("Label1");
TextBox head = (TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("TextBox1");
TextBox des = (TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("TextBox2");
TextBox date = (TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("TextBox3");
TextBox time = (TextBox)GridView1.Rows[e.RowIndex].Cells[4].FindControl("TextBox4");
FileUpload photo = (FileUpload)GridView1.Rows[e.RowIndex].Cells[5].FindControl("FileUpload1");
Pooja Vekariya
63
Daily News
HiddenField old_photo = (HiddenField)GridView1.Rows[e.RowIndex].Cells[5].FindControl("HiddenField1");
String path = "";
if (photo.HasFile)
{
photo.SaveAs(Server.MapPath("~/Upload/") + photo.FileName);
path = photo.FileName;
}
else
{
path = old_photo.Value;
}
cn.Open();
cmd = new SqlCommand("update content set co_headline='" + head.Text +
"',co_des='"+des.Text+"',co_date='"+date.Text+"',co_time='"+time.Text+"',co_photo='"+path+"' where
co_id='" + Convert.ToInt32(id.Text) + "'", cn);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("view_content.aspx");
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.ToString() == "Delete")
{
int id = Convert.ToInt32(e.CommandArgument.ToString());
cn.Open();
cmd = new SqlCommand("delete from content where co_id='" + id + "'", cn);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("view_content.aspx");
} }}
Content.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void Button1_Click(object sender, EventArgs e)
Pooja Vekariya
64
Daily News
{
FileUpload1.SaveAs(Server.MapPath("~/Upload/") + FileUpload1.FileName);
cn.Open();
cmd = new SqlCommand("Insert into content(co_headline,co_des,co_date,co_time,co_photo,c_id) values
('" + txt_head.Text +
"','"+txt_des.Text+"','"+txt_date.Text+"','"+txt_time.Text+"','"+FileUpload1.FileName+"','"+ddl_cat.SelectedVal
ue+"')", cn);
int id = cmd.ExecuteNonQuery();
if (id > 0)
{
Label1.Text = "New Category Successfully Inserted";
}
else
{
Label1.Text = "Error while Inserting New Category";
}
cn.Close(); Response.Redirect("view_content.aspx");
Video.aspx
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="contents">
<div class="background">
<center><asp:Label ID="Label1" runat="server" Text="" ForeColor="Red" Font-Bold="true"></asp:Label><br
/><br />
<asp:Panel ID="Panel1" runat="server" BackColor="#3B2D1D" Style=" border-radius:5px 5px 5px;border:solid
1px #FF9900;padding:10px 10px 10px 10px" Width="600px" HorizontalAlign="Left">
<center><h2>Add New Video</h2></center> <br />
<asp:TextBox ID="txt_head" runat="server" Width="580px" placeholder="Headline of the
News"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_head"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<br /><asp:FileUpload ID="FileUpload1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="FileUpload1"
Display="Dynamic" ForeColor="Red" SetFocusOnError="True"
ValidationGroup="group1">*</asp:RequiredFieldValidator>
<br /><asp:DropDownList ID="ddl_cat" runat="server" DataSourceID="SqlDataSource1"
Pooja Vekariya
65
Daily News
DataTextField="c_name" DataValueField="c_id" Width="580px"></asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [category]"></asp:SqlDataSource>
<br /><center><asp:Button ID="Button1" runat="server" Text="ADD" Width="137px" OnClick="Button1_Click"
ValidationGroup="group1" /></center>
</asp:Panel></center> </div></div></asp:Content>
Video.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["con"].ConnectionString);
}
protected void Button1_Click(object sender, EventArgs e)
{
FileUpload1.SaveAs(Server.MapPath("~/Upload/") + FileUpload1.FileName);
cn.Open();
cmd = new SqlCommand("Insert into video(v_title,v_video,c_id) values ('" + txt_head.Text + "','" +
FileUpload1.FileName + "','" + ddl_cat.SelectedValue + "')", cn);
int id = cmd.ExecuteNonQuery();
if (id > 0)
{
Label1.Text = "New Video Successfully Inserted";
}
else
{
Label1.Text = "Error while Inserting New Video";
}
cn.Close();
}}
Pooja Vekariya
66
Daily News
ERROR & SOLUTION
Error 1:
Solution:
Total number fields and number of values not matched, there is one extra
filed name written then values.
Error 2:
Solution:
Syntax of delete query is wrong. In delete query * is not used.
Right syntax is. Delete from table name where fieldname=’’value’’
Pooja Vekariya
67
Daily News
Error 3:
Solution:
To execute this query an open connection with database is required. So. I have to
remove comment line before cn.open() line.
Error 4:
Solution:
This is a common error. It appears while we have used wrong path of web
form or wrong name of file.
Pooja Vekariya
68
Daily News
Testing
Testing is important factor of developing side. An application is built by developer than
without testing might be flaws will remain in application so for that purpose testing is
required.
Testing is conducted at the phase level in software development life cycle or at module level
in program code.
Tests can be conducted based on two approaches.
Functionality Testing
Implementation Testing
When functionality is being tested without taking the actual implementation in concern it is
known as black-box testing. While on the other side where not only functionality is tested
but the way it is implemented is also analyzed is known as white box testing.
Black-box Testing:
BLACK BOX TESTING is defined as a testing technique in which functionality of the
Application under Test (AUT) is tested without looking at the internal code structure,
implementation details and knowledge of internal paths of the software. This type of testing
is based entirely on software requirements and specifications.
In Black Box Testing we just focus on inputs and output of the software system without
bothering about internal knowledge of the software program.
White Box Testing:
WHITE BOX TESTING is testing of a software solution’s internal structure, design, and
coding.
In this type of testing, the code is visible to the tester. It focuses primarily on verifying the
flow of inputs and outputs through the application, improving design and usability,
strengthening security.
White box testing is also known as Clear Box testing, Open Box testing, Structural testing,
Transparent Box testing, Code-Based testing, and Glass Box testing.
Pooja Vekariya
69
Daily News
Unit Testing:
UNIT TESTING is a level of software testing where individual units/ components of software
are tested. The purpose is to validate that each unit of the software performs as designed.
A unit is the smallest testable part of any software. It usually has one or a few inputs and
usually a single output.
Integration Testing
When the unit testing is over, the entire module are integrated and tested as a whole. It
might be possible that all modules may work individually, but they may not work when I put
them together.
Performance Testing
Performance testing is designed to test the runtime performance of the system within
thev Context of the system.
These tests Developer performed as module level as Developer As system level.
Individual modules Developers tested for required performance.
Validation Testing
Simple definition of it is what a validation succeeds when software function in manner that
can be reasonably accepted by the user.
Pooja Vekariya
70
Daily News
Limitations
In my project notification facility with email or SMS is not available at this time.
In my project there are too many images and videos of latest news so it takes time to load
the website
In my project registration is mandatory, only registered users can read and see videos of
latest news.
Language changing system has not developed.
Pooja Vekariya
71
Daily News
CONCLUSION
I conclude that by developing this site, I learn to develop actual website.
This work is very challenging and I trying my best to develop a news portal system.
I also get knowledge about how to design a website on Asp.Net platform. It was a really
good experience for me to do a project in this semester.
Working on this project has given me a valuable experience.
Pooja Vekariya
72
Daily News
Reference

www.news18.com

www.sandeshnews.com

www.aajtak.com
Pooja Vekariya
73
Download