Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

What is Active Server Pages (ASP)

Active Server Pages, commonly referred to as ASP, is Microsoft's solution to server-side


scripting. With simple HTML pages, the client (a web surfer) requests a web page from a server
(some www.blah.com). The server just sends the file to the client, and the page is shown on the
client's browser.

With Active Server Pages, the server gets a chance to alter the file before sending it to the user.
So, for every request for a file with a .ASP extension, the server runs the file through a DLL
called ASP.DLL, which parses the ASP commands.

To use Active Server Pages you must be running a Microsoft webserver; Microsoft makes a
number of Web servers that are freely available. If you have Windows NT 4.0 Server installed,
you can download IIS 3.0 or IIS 4.0, both of which support ASP development. If you have
Windows 2000, you can use IIS 5.0. If you have Windows 9X or Windows NT Workstation, you
can use Personal Web Server (PWS).

If you are running a Microsoft Web server, to run an ASP file, all you need to do is create a file
on the webserver with a .ASP extension. When the browser requests the file, the webserver is
smart enough to preprocess the file before sending it off to the client.

You can have your ASP code connect to a database (SQL, Access, Oracle, Informix, or any
ODBC-compliant database) and dynamically insert the data into your HTML pages. This leads to
some very powerful possibilities including ECommerce, customizable sites, data entering /
retrieving systems run over the Internet, and a slew of other possibilities.

ASP.NET - Introduction
ASP.NET is a web development platform, which provides a programming model, a
comprehensive software infrastructure and various services required to build up robust web
applications for PC, as well as mobile devices.

ASP.NET works on top of the HTTP protocol, and uses the HTTP commands and policies to set
a browser-to-server bilateral communication and cooperation.

ASP.NET is a part of Microsoft .Net platform. ASP.NET applications are compiled codes,
written using the extensible and reusable components or objects present in .Net framework.
These codes can use the entire hierarchy of classes in .Net framework.

The ASP.NET application codes can be written in any of the following languages:

• C#
• Visual Basic.Net
• Jscript
• J#

ASP.NET is used to produce interactive, data-driven web applications over the internet. It
consists of a large number of controls such as text boxes, buttons, and labels for assembling,
configuring, and manipulating code to create HTML pages.

ASP.NET Web Forms Model


ASP.NET web forms extend the event-driven model of interaction to the web applications. The
browser submits a web form to the web server and the server returns a full markup page or
HTML page in response.

All client side user activities are forwarded to the server for stateful processing. The server
processes the output of the client actions and triggers the reactions.

Now, HTTP is a stateless protocol. ASP.NET framework helps in storing the information
regarding the state of the application, which consists of:

• Page state
• Session state

The page state is the state of the client, i.e., the content of various input fields in the web form.
The session state is the collective information obtained from various pages the user visited and
worked with, i.e., the overall session state. To clear the concept, let us take an example of a
shopping cart.

User adds items to a shopping cart. Items are selected from a page, say the items page, and the
total collected items and price are shown on a different page, say the cart page. Only HTTP
cannot keep track of all the information coming from various pages. ASP.NET session state and
server side infrastructure keeps track of the information collected globally over a session.

The ASP.NET runtime carries the page state to and from the server across page requests while
generating ASP.NET runtime codes, and incorporates the state of the server side components in
hidden fields.

This way, the server becomes aware of the overall application state and operates in a two-tiered
connected way.

The ASP.NET Component Model


The ASP.NET component model provides various building blocks of ASP.NET pages. Basically
it is an object model, which describes:

• Server side counterparts of almost all HTML elements or tags, such as <form> and
<input>.
• Server controls, which help in developing complex user-interface. For example, the
Calendar control or the Gridview control.

ASP.NET is a technology, which works on the .Net framework that contains all web-related
functionalities. The .Net framework is made of an object-oriented hierarchy. An ASP.NET web
application is made of pages. When a user requests an ASP.NET page, the IIS delegates the
processing of the page to the ASP.NET runtime system.

The ASP.NET runtime transforms the .aspx page into an instance of a class, which inherits from
the base class page of the .Net framework. Therefore, each ASP.NET page is an object and all its
components i.e., the server-side controls are also objects.

Difference between ASP and ASP.NET:

ASP ASP.NET
ASP is the interpreted languages. ASP.NET is the compiled language.
ASP uses ADO (ActiveX Data Objects) technology to ASP.NET uses ADO.NET to connect
connect and work with databases. and work with database.
ASP is partially object oriented. ASP.NET is fully object oriented.
ASP.NET Pages have the file extension
ASP Pages have the file extension .asp.
.aspx.
ASP.NET inherit the class written in
ASP doesn’t have the concept of inheritance.
code behind.
ASP.NET use full fledged programming
ASP pages use scripting language.
language.
Error handling is very good in
Error handling is very poor in ASP.
ASP.NET.
ASP has maximum four in-built classes i.e. Request, ASP.NET has more than 2000 in-built
Response, Session and Application. classes.

You might also like