You are on page 1of 74

INTRODUCTION

1.1) Purpose of the Project:

 Content Dynamic’s are frequently used for storing, controlling, versioning, and
publishing industry-specific documentation such as news articles, operators'
manuals, technical manuals, sales guides, and marketing brochures..
 A Content Dynamics is a computer application used to create, edit, manage,
search and publish various kinds of digital media and electronic text.
 The Content Dynamics approach incorporates the best aspects of Flexible
Technology, a Proven Workflow and Experienced Editors working collectively to
migrate the content.
 This tool is mostly used for to incorporate content in the content based websites.

1.2) Scope of the Project:

 The ability to assign roles and responsibilities to different content categories


or types.
 Definition of workflow tasks for collaborative creation, often coupled with event
Messaging so that content managers are alerted to changes in content.
 The ability to track and manage multiple versions of a single instance of content.
 The ability to publish the content to a repository to support access to the content.
 Separation of content's semantic layer from its layout.

1.3) Project Overview:

If we Observe many of the sites like yahoo, rediff, MSN and many other websites
are often change ads, titles, newsletters, help and other stuff. In order to make these
changes they needed an efficient system to manage content . We might have seen so many
content management systems; however this system is uses Asynchronous Java script and
XML in most of the functionalities with 3- tier architecture. Content dynamics is software
used to create, edit, manage, and publish content in a consistently organized fashion.

-1-
This System is frequently used for storing, controlling, versioning, and publishing
industry-specific documentation such as news articles, operators' manuals, technical
manuals, sales guides, and marketing brochure. In this system the authorization of
resources are provided on user’s role based. Unlike the other content management
systems, this system has rich and friendly user interface and it is reliable. This is
developed in such a way that can be used by small scale industries in less maintenance
cost.

This system consists of the following roles to manage the content:

Authors: Authors are the initiators in this system. They will give the raw content.

Editors: Editors are the intemediatory persons in this system. They will update the
content.

Approvers: Approvers responsibility is to review the content and approves the content.

Deployers: Deployers take the approved content and will give appropriate ranking for the
content.

Modules:
 Administrating.

 Authoring.

 Editing.

 Approval.

 Deployment

 User ‘s manipulation

2) PROJECT ANALYSIS:
2.1) Existing System:

 In the previous system, the migration of content is done using E-Mail, due to this
versioning of content changes.
 There were no individual roles present to manage the content.
 Small scale organizations can not afford paid versions inorder to manage their
content.

-2-
2.2) Proposed System:

 All our Content Management Systems (CMS) have password protected


administration areas and are easy to use.
 The CMS gives you complete control over both the contents and the structure of
your website. It allows the user to both add to and update the contents of your
pages using a simple “point and click” interface.
 Our Content management Software grants the user a large degree of control over
how the information on the page is presented.
 New layouts can be added by request, and custom layouts can be created to meet
the needs of the information you would like to present

2.3) HARDWARE AND SOFTWARE SPECIFICATIONS:


Hardware Requirements:

 LAN connection
 TCP/IP protocol
 System with P2 processor
 256MB RAM(min) and
 Database memory.

Software Requirements:

 Microsoft .Net framework 2.0


 Microsoft ASP.Net.
 Visual C#
 Html
 Microsoft SQL server 2000or above
 AJAX control Tool kit.

-3-
3) SYSTEM DEVELOPMENT AND ENVIRONMENT

3.1).NET Framework

 The Microsoft .NET Framework is a new computing platform that simplifies


application development in the highly distributed environment of the internet. It
provides a large body of pre-coded solutions to common program requirements,
and manages the execution of the programs written specifically for the
framework.

The .NET Framework contains three major parts:


1) The common language runtime
2) The Framework class library
3) ASP.Net

The common language runtime:


 The Common Language Runtime (CLR) is a core component of Microsoft's
.NET initiative. It is Microsoft's implementation of the Common Language
Infrastructure (CLI) standard, which defines an execution environment for
program code. The CLR runs a form of bytecode called the Common Intermediate
Language .
 Developers using the CLR write code in a language such as C# or VB.Net. At
compile time, a .NET compiler converts such code into CIL code. At runtime, the
CLR's just-in-time compiler converts the CIL code into code native to the
operating system.

ARCHITECTURE

-4-
 Alternatively, the CIL code can be compiled to native code in a separate step prior
to runtime. This speeds up all later runs of the software as the CIL-to-native
compilation is no longer necessary.

Class library:

Microsoft .NET Framework includes a set of standard class libraries. The class library is
organized in a hierarchy of namespaces. Most of the built in APIs are part of either
System. or Microsoft namespaces. It encapsulates a large number of common functions,
such as file reading and writing, graphic rendering, database interaction, and XML
document manipulation, among others. The .NET class libraries are available to all .NET
languages. The .NET Framework class library is divided into two parts: the Base Class
Library and the Framework Class Library.

The Base Class Library (BCL) includes a small subset of the entire class library and is
the core set of classes that serve as the basic API of the Common Language Runtime. The

-5-
classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are
considered to be a part of the BCL. The BCL classes are available in both .NET
Framework as well as its alternative implementations including .NET Compact
Framework, Microsoft Silverlight and Mono.

The Framework Class Library (FCL) is a superset of the BCL classes and refers to the
entire class library that ships with .NET Framework. It includes an expanded set of
libraries, including WinForms, ADO.NET, ASP.NET, Language Integrated Query,
Windows Presentation Foundation, Windows Communication Foundation among others.
The FCL is much larger in scope than standard libraries for languages like C++, and
comparable in scope to the standard libraries of Java.

3.2) ASP.NET:

ASP.NET is a server side scripting technology that enables scripts (embedded in web
pages) to be executed by an Internet server.ASP.NET is a Microsoft Technology.
ASP stands for Active Server Pages ASP.NET is a program that runs inside IIS.IIS
(Internet Information Services) is Microsoft's Internet server. IIS comes as a free
component with Windows servers .IIS is also a part of Windows 2000 and XP
Professional.
1. An ASP.NET file is just the same as an HTML file

2. An ASP.NET file can contain HTML, XML, and scripts

3. Scripts in an ASP.NET file are executed on the server

4. An ASP.NET file has the file extension ".aspx".

There are many things you can do with Active Server Pages. You can display
date, time, and other information in different ways. You can make a survey form and
ask people who visit your site to fill it out, send emails, save the information to a file,

-6-
You can have a database which people can access via the web. People can get
information from the database as well as update or insert information into it. You can
passwords-protect certain sections of your site, and make sure that only authorized
users can see that information.

Since the server must do additional processing on the ASP scripts, it must
have the ability to do so. The only servers which support this facility are Microsoft
Internet Information Services & Microsoft Personal Web Server.

FEATURES OF ASP.NET:

ASP.NET is not just a simple upgrade or the latest version of ASP. ASP.NET
combines unprecedented developer productivity with performance, reliability, and
deployment. ASP.NET redesigns the whole process. It's still easy to grasp for new comers
but it provides many new ways of managing projects. Below are the features of ASP.NET.

1. Easy Programming Model

2. Flexible Language Options

3. Compiled execution

4. Web-Farm Session State

5. Enhanced Reliability

6. Easy Deployment

7. Dynamic update of running application

8. Easy Migration Path

9. XML Web Services

INTERNET INFORMATION SERVICE:

-7-
This is Microsoft’s web server designed for the Windows NT platform. It can
only run on Microsoft Windows NT 4.0, Windows 2000 Professional, & Windows
2000 Server. The version used for windows Xp professional is IIS 5.1, the current
version is 6.0, and it ships as a part of the 2000 operating system.

Internet Information Services (IIS) 5.1 for Microsoft Windows XP


Professional brings the power of Web computing to Windows. With IIS, you can
easily share files and printers, or you can create applications to securely publish
information on the Web to improve the way your organization shares information. IIS
is a secure platform for building and deploying e-commerce solutions and mission-
critical applications to the Web.

Using Windows XP Professional with IIS installed provides a personal and


development operating system that allows you to:

• Set up a personal Web server

• Share information within your team

• Access databases

• Develop an enterprise intranet

• Develop applications for the Web.

IIS integrates proven Internet standards with Windows, so that using the Web
does not mean having to start over and learn new ways to publish, manage, or
develop content

3.3) ADO.NET
ADO.NET is a set of computer software components that can be used by programmers to
access data and data services. It is a part of the base class library that is included with the

-8-
Microsoft .NET Framework. It is commonly used by programmers to access and modify
data stored in relational database systems, though it can also be used to access data in
non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data
Objects (ADO) technology, but was changed so extensively that it can be considered an
entirely new product.
Architecture:

ADO.NET consists of two primary parts:


Data provider
These classes provide access to a data source, such as a Microsoft SQL Server or Oracle
database and OLEDB data provider. Each data source has its own set of provider objects,
but they each have a common set of utility classes:
 Connection: Provides a connection used to communicate with the data source.
Also acts as an abstract factory for command objects.
 Command: Used to perform some action on the data source, such as reading,
updating, or deleting relational data.
 Parameter: Describes a single parameter to a command. A common example is a
parameter to a stored procedure.
 Data Adapter: A bridge used to transfer data between a data source and a Dataset
object (see below).

-9-
 Data Reader: Used to efficiently process a large list of results one record at a
time. It allows records to be accessed in a read-only, forward-only mode, i.e.,
records have to be accessed in sequential order; they can neither be randomly
accessed nor can a record which has been processed previously be accessed again.
Datasets
Dataset objects, a group of classes describing a simple in-memory relational database,
were the star of the show in the initial release (1.0) of the Microsoft .NET Framework.
The classes form a containment hierarchy:
 A Dataset object represents a schema (either an entire database or a subset of
one). It can contain tables and relationships between those tables.
 A Data Table object represents a single table in the database. It has a name, rows,
and columns.
 A Data View object "sits over" a Data Table and sorts the data (much like a SQL
"order by" clause) and filters the records (much like a SQL "where" clause) if a
filter is set. An in-memory index is used to facilitate these operations. All Data
Tables have a default filter, while any number of additional Data Views can be
defined, reducing interaction with the underlying database and thus improving
performance.
 A Data Column represents a column of the table, including its name and type.
 A Data Row object represents a single row in the table, and allows reading and
updating of the values in that row, as well as retrieving any rows that are related
to it through a primary-key foreign-key relationship.
 A DataRowView represents a single row of a Data View. The distinction between
a Data Row and DataRowView is important when iterating over a result set.
 A Data Relation is a relationship between tables, such as a primary-key foreign-
key relationship. This is useful for enabling Data Row’s functionality of retrieving
related rows.
 A Constraint describes an enforced property of the database, such as the
uniqueness of the values in a primary key column. As data is modified any
violations that arise will cause exceptions.

- 10 -
A Dataset is populated from a database by a Data Adapter whose Connection and
Command properties have been set. However, a Dataset can save its contents to XML
(optionally with an XSD schema), or populate itself from XML, making it exceptionally
useful for web services, distributed computing, asional

3.4) CHARACTERISTICS OF C#:

Elegant object oriented design: The concurrence with these golden principles of
object orientation, encapsulation, inheritance and polymorphism, has made C#
programming a great choice for architecting a wide range of components from high-
level business objects to system - level software applications. The C# programming
language constructs converts these components into XML Web services, which
permits them to be invoked across the Internet, from any language running on any
operating system.

Safety and Productivity: In C#, the unsafe code must be explicitly declared with the
modifier as 'unsafe' to prevent accident features. Moreover, the compiler and
execution engine works hand in hand to ensure that the unsafe code is not executed in
an unreliable environment.

Name spaces: C# does its job in a hierarchical name space model. Namespaces are
C# program elements which help to organize programs. Objects are grouped into
name spaces and a particular namespace has to be included in a software program to
access the classes and objects within it.

Security: In C#, unsafe codes must be explicitly declared unsafe by the modifier to
prevent accident features. Moreover the compiler and execution engine work hand in
hand and ensure that an unsafe code is not executed in an unreliable environment.

Garbage collection: The memory management feature leads all managed objects.
Garbage collection is a feature of .NET that C# uses during runtime.

Data types: This is a regulatory type language set rules to maintain the integrity of
data stored in it. Three types of data types include value types, reference types,

- 11 -
boxing and unboxing. There are also simple types namely integral type, Boolean type,
char type, floating- point type, decimal type, structure type, and enumeration type.

Versioning: C# programming supports this versioning. . NET solves the versioning


problem and enables the software developer to specify version dependencies between
different pieces of software.

Indexes: C# has indexes which help to access value in a class with an array like
syntax.

Error Elimination: C# programming eliminates costly software programming errors,


through garbage collection which are automatically initialized by the environment
type safe variables. C# makes it simple for the software developer to write and
maintain programs that give solutions for complex business problems.

Flexibility & Power: C# has the flexibility which permits typed, extensible metadata
that can be applied to any object. A project architect can define domain-specific
attributes and apply them to any language, element, classes, interfaces and so on.

Extensive inter-operability: Almost all enterprise software applications can be


managed easily by type-safe environment. This extensive inter-operability makes C#
the obvious choice for most of the software developers.

To conclude, the inference is that C# programming is a sophisticated language


for the sophisticated world, which is productive, object oriented and lessens
development, while keeping in pace with the programming heritage of C++. This
brand new language facilitates programmers to develop, fast and easy solutions for
.NET development environment. And it does it all by considerably reducing the
increased development costs, providing flexibility and productivity.

4. Project Design
4.1) UML DIAGRAMS
A usecase diagram is a diagram that shows a set of
usecases and actors and their relationships. A use case diagram is a special kind of

- 12 -
diagram and share the same common properties as do all other diagrams, a name and
graphical contents and that are a projection into a model.

Use case diagram commonly contains


 Usecases
 Actors
 Dependency, generalization, association relation ship.

USECASE:
A usecase is a description of a set of sequences of actions that a system performs.

ACTORS:
Actor is any type of user belongs to that system.

RELATIONSHIPS:
Dependency:
Dependency is semantic relationship between two things in which a change to one thing
may affect the semantics of the other thing.
Associations:

Association is a structural relationship that describes a set of links, link being a


connection among objects.

Generalization:

A generalization is a specialization relationship in which objects of the specialized


element are substitutable for objects of the generalized element.

Realization:

- 13 -
It is a semantic relationship between classifiers, where in one classifier specifies a
contractive that another classifier guarantees to carry out.

USECASE DIAGRAMS

AUTHOR EDITOR

CREATE ACCOUNT

APPROVER DEPLOYER

Usecase diagram for Author

- 14 -
CREATE CONTENT

LIST CONTENT

CRATE NOTES

AUTHOR

UPDATE NOTES

DELETE NOTES

Usecase diagram for Approver

- 15 -
CONTENT LIST

APPROVER CONTENT SUBMIT

RETURN CONTENT TO EDITOR

Usecase diagram for Deployer

- 16 -
CONTENT DEPLOY

CONTENT VIEW
DEPLOYER

REJECT CONTENT

Usecase diagram for User

- 17 -
DEPLOYMENT CONTENT

MANAGEMENT CONTENT
USER

PROTECTED CONTENT

Sequence diagrams

- 18 -
Login Create Content List Content Remove Create Note Update note Remove note
Content

: Author Validate User

Enter In to login Form

Create content

View

Remove Content

Creayte Note

Update Notes

Remove Notes

Sequence diagram for deployer

- 19 -
Login Content deploy Deploy list Reject Content Remove

Validate user

Deploy

Deploy list

Reject List

Remove Content

Sequence diagram for user

- 20 -
Create account Login User View Content

User

New User

Enter Login

He can view Content

4.2) Data Flow Diagram:

- 21 -
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an
information system. It differs from the flowchart as it shows the data flow instead of the
control flow of the program.

Data flow diagram levels

Level0 shows the overall context of the system and its operating environment and shows
the whole system as just one process. It does not usually show data stores, unless they are
"owned" by external systems, e.g. are accessed by but not maintained by this system,
however, these are often shown as external entities.

Level 1 show all processes at the first level of numbering, data stores, external entities
and the data flows between them. The purpose of this level is to show the major high
level processes of the system and their interrelation. A process model will have one, and
only one, level 1 diagram. A level 1 diagram must be balanced with its parent context
level diagram, i.e. there must be the same external entities and the same data flows, these
can be broken down to more detail in the level 1, e.g. the "enquiry" data flow could be
spilt into "enquiry request" and "enquiry results" and still be valid.

Level2 is a decomposition of a process shown in a level 1 diagram, as such there should


be level 2 diagrams for each and every process shown in a level 1 diagram. As before, a
level 2 diagram must be balanced with its parent level 1 diagram.

DATAFLOW DIAGRAM FOR LEVEL0:

- 22 -
LEVEL 1:

- 23 -
LEVEL 2:

- 24 -
4.3) Architecture

- 25 -
SOFTWARE ARCHITECTURE:

- 26 -
TECHNICAL ARCHITECTURE:

- 27 -
4.4) DATABASE DESIGN:

ACCOUNT

COLUMN NAME DATA TYPE NULL


ACCOUNT ID INT NOT NULL
USERNAME VARCHAR
PASSWORD VARCHAR
EMAIL VARCHAR
MODIFIED DATE DATETIME
CREATIONDATE DATETIME
ACCOUNTROLE ID INT

ACCOUNTPROPERTY

COLUMN NAME DATA TYPE NULL


ACCOUNT ID INT
PROPERTY VARCHAR
VALUE TEXT VARCHAR
MODIFIED DATE DATETIME
CREATION DATE DATETIME

ACCOUNT ROLES

COLUMN NAME DATA TYPE NULL


ACCOUNTROLE ID INT NOT NULL
ROLE VARCHAR
CREATION DATE DATETIME
USERNAME VARCHAR
PASSWORD VARCHAR
EMAIL ID VARCHAR

CONTENT

- 28 -
COLUMN NAME DATA TYPE NULL
CONTENT ID INT NOT NULL
VERSION VARCHAR
PROTECTED INT
HEADLINE VARCHAR
SOURCE TEXT
BYLINE VARCHAR
TEASERS TEXT
BODY TEXT
TAGLINE VARCHAR
STATUS INT
EDITOR INT
APPROVER INT
UPDATEUSER ID INT
MODIFIED DATE DATETIME
CREATION DATE DATETIME
ZONE ID INT
RANK ID INT

CONTENT NOTES

COLUMN NAME DATA TYPE NULL


NOTE ID INT
CONTENT ID INT
NOTE VARCHAR
AUTHOR ID INT
MODIFIED DATE DATETIME
CREATION DATE DATETIME

CONTENT RANK

COLUMN NAME DATA TYPE NULL


RANK ID INT NOT NULL
RANK CHAR

- 29 -
DISTRIBUTION

COLUMN NAME DATA TYPE NULL


CONTENT ID INT
ZONE ID INT
VERSION INT
RANKING INT
MODIFIED DATE DATETIME
CREATION DATE DATETIME

DOMAIN

COLUMN NAME DATA TYPE NULL


DOMAIN ID INT NOT NULL
DOMAIN TYPE VARCHAR
PROTECTED INT
TITLE CHAR
DESCRIPTION CHAR
MODIFIED DATE DATETIME
CREATION DATE DATETIME

ROLES

COLUMN NAME DATA TYPE NULL


ROLE ID INT
ROLE VARCHAR

- 30 -
STATUS CONTENT

COLUMN NAME DATA TYPE NULL


STATUS INT NOT NULL
STATUS NAME VARCHAR

ZONE

COLUMN NAME DATATYPE NULL


ZONE ID INT NOT NULL
PROTECTED INT
TITLE VARCHAR
DESCRIPTION CHAR
DOMAIN ID INT
MODIFIED DATE DATETIME
CREATION DATE DATETIME

5. Screens

This is the login page where the any of the employee can logon and can perform
corresponding actions.

- 31 -
This is the administrator welcome page where he can perform corresponding action.

- 32 -
In this page administrator will create the account for individual roles with corresponding
username and password.

- 33 -
In this page administrator can view the list of accounts and also the navigation to the
other pages.

- 34 -
In this page administrator can update the account only by changing password also by
selecting role.

- 35 -
In this page administrator will remove the account that involves removing the details
from the database.

- 36 -
This is the welcome page for author, who is responsible for initiating the system.

- 37 -
- 38 -
- 39 -
- 40 -
- 41 -
- 42 -
- 43 -
- 44 -
- 45 -
- 46 -
- 47 -
- 48 -
- 49 -
- 50 -
- 51 -
- 52 -
- 53 -
- 54 -
- 55 -
- 56 -
- 57 -
- 58 -
- 59 -
- 60 -
- 61 -
- 62 -
- 63 -
- 64 -
- 65 -
- 66 -
- 67 -
6.) PROJECT TESTING

6.1) Software Testing and Quality Assurance:

Software Testing: Software testing is critical element of software quality assurance and
represented the ultimate of review of specifications, design and coding. If testing is
conducted successfully, it will uncover errors in the software. As a secondary benefit,
testing demonstrate that software function appear to be working according to the
specifications that performance requirement appear to have been meet.
Why should we do testing?
 Error free superior product
 Quality assurance to the client

System Testing:

As more critical function in business organizations activity are automated, more and more
trust is being is placed in automated systems. This realization puts an ever increasing
burden on system annalist to ensure that quality of systems. Depend on this design,
development, testing and implementation and weakness in any areas will seriously
jeopardize the quality.

Designing reliable systems:

A system is said to be reliable if it doesn’t produced unexpected failure when it is used in


a reasonable manner i.e. in a manner that a typical user expect a normal. They are two
levels of reliability

Testing:

No system is ever perfect, communication problems, programs negligible or more


constraints create more errors that must be eliminated before delivering system to the
users. A system is tested for on line response, value of transactions, stress recovery from
failure and durability.

Testing strategy:

Considering from procedure point of view, testing is actually a series of three steps that
are implemented sequentially initially, test of each module is conducted individually,
ensuring that is functions properly as a unit. Hence, it is called UNIT TESTING next;
module must be assemble or integrated as a set of higher order test is conducted.

- 68 -
6.2) Unit Testing:

Unit testing mainly focuses verification effort on the smallest unit of software design
module. Using the design document, important control part are testing to uncover errors
within the boundary of the module.
Basically unit testing is of two types names white box testing or black box testing. This
structure testing is also referred to as “white Box” or “Glass Box” testing.

6.3) Integrated Testing:

Integration testing is a systematic technique for constructing the program structure, while
as the same time conducting test to uncover the errors associated with the interfacing. The
objective is to take unit tested modules and build the program structure that has been
dictated by the design.

Top-Down Integration:

Top-Down integration is an incremental; approach in the construction of program


structure. Modules are integrated by moving download through the control hierarchical
beginning with the main control module to the subordinate modules.

Bottom-Up Integration:

Bottom-Up integration testing, as it names implies, begins construction and testing with
atomic modules and moving towards the higher modules. The type of integration is
depending on the application under development.
Information systems follow stop down integration mechanism moving from one level to
another level in a hierarchical format.

6.4) Validation Testing:

This test mainly concentrates on the software requirements specifications, a document


that describe user-visible attribute of the software. According to I.S the validation testing
refers to the weather the end user entered is an authorized user or not, if not he is not
allowed for login on. While submitting the requirement it is taken care such that the user
will not leave requirement null. The echo, he enters should not be blank.

- 69 -
7. CONCLUSION

Content management practices and goals vary with mission. News organizations, e-
commerce websites, and educational institutions all use content management, but in
different ways. This leads to differences in terminology and in the names and number of
steps in the process.

Typically, though, the digital content life cycle consists of 6 primary phases: create,
update, publish, translate, archive and retrieve. For example, an instance of digital
content is created by one or more authors. Over time that content may be edited. One or
more individuals may provide some editorial oversight thereby approving the content for
publication.

Publishing may take many forms. Publishing may be the act of pushing content out to
others, or simply granting digital access rights to certain content to a particular person or
group of persons. Later that content may be superseded by another form of content and
thus retired or removed from use.

- 70 -
8. FUTURE ENHANCEMENT

Content Management Systems and their functionality are evolving to encompass an


organisation's total information requirements. Enhancement involves implementation in
three key areas like:
 Electronic Document and Records Management, where we work closely
with Document Management vendors
 Enterprise Search Engines, where we have accommodated search engine
traversal of dynamic sites
 Portal Technologies, where we are investigating the integration of several
best-of-breed portal technologies to enhance delivery of a total solution
to a client's ECM or KM requirements.

- 71 -
9.) BIBILOGRAPHY

Reference Books:

1. UNLEASHED ASP.NET

------------STEPHEN WALTHER

10. ASP.NET

------------WROX PUBLICATIONS

11. MODERN DATABASE MANAGEMENT SYSTEMS

------------Dr.EF.CODD

Websites:

1) www.4guysfromrolla.com

2) www.wrox.com

3) www.wikipedia.com

- 72 -
Coding:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class content_grid : System.Web.UI.Page


{
SqlConnection con = new SqlConnection("Data Source=.;Databases=content
dynamics;User Id=sa;Password=sa");
SqlCommand cmd = new SqlCommand("select * from Content");
SqlDataAdapter da;
DataSet ds;
int status = 0;

protected void Page_Load(object sender, EventArgs e)


{
if (!IsPostBack)
{
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
ds = new DataSet();
da = new SqlDataAdapter(cmd);
da.Fill(ds, "Details");
gdv1.DataSource = ds;
gdv1.DataBind();
}
}
protected void gdv1_SelectedIndexChanged(object sender, EventArgs e)
{

- 73 -
protected void gdv1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "submit")
{
Response.Redirect("content_sub.aspx");
}
else if (e.CommandName == "view")
{
Response.Redirect ("viewpage.aspx");
}
else if (e.CommandName == "Note")
{
Response.Redirect("content_note.aspx");
}

else if (e.CommandName == "update")


{
Response.Redirect("update_page.aspx");
}
else if (e.CommandName == "Remove")
{
Response.Redirect("Remove_page.aspx");
}
}
}

- 74 -

You might also like