Chapter 5 - Introduction To
Chapter 5 - Introduction To
NET Introduction
ASP.NET Introduction
Main Menu 1 of 46
ASP.NET Introduction
Objective
At the end of this chapter, you will be able to
understand what ASP.NET is and how the ASP &
ASP.NET pages work.
Besides, you’ll be able to understand the advantages
ASP.NET provides over ASP.
Main Menu 2 of 46
ASP.NET Introduction
Scope
Introduction to ASP
Introduction to ASP.NET
How ASP.NET works
Advantage of ASP.NET over ASP
Pre requisite for learning ASP.NET
Language support
What is HTTP
Writing first ASP.NET Page
Main Menu 3 of 46
ASP.NET Introduction
Introduction to ASP
Microsoft introduced Active Server Pages in
December 1996. Microsoft made it available for its
Internet Information Server (IIS).
ASP Page is saved with an extension of .asp e.g.
“test.asp”, which is interpreted at the server end.
ASP code can be written in VBScript or Jscript or
Perl or any other scripting language provided the
server has a scripting engine available for script.
Main Menu 4 of 46
ASP.NET Introduction
his browser.
• Internet then connects to the specified server where the
Web page resides.
• The requested server is a Windows NT server running the
IIS.
Main Menu 5 of 46
ASP.NET Introduction
Main Menu 6 of 46
ASP.NET Introduction
Main Menu 7 of 46
ASP.NET Introduction
Main Menu 8 of 46
ASP.NET Introduction
ASP Objects
An Object can be defined as something that has
methods, properties, and collections.
ASP has the following built-in objects :
The ScriptingContext Object: It is available
to the scripting host along with the scripting objects.
• The Request Object
• The Response Object
• The Application Object
• The Session Object
• The Server Object
Main Menu 9 of 46
ASP.NET Introduction
Introduction to ASP.NET
ASP.NET has been built on common language
runtime that can be used on a server to build
powerful web Applications.
It is a part of emerging Microsoft .NET platform and
provides innovative ways to build and deploy the
next generation of ASP for use in high performance
web solutions.
ASP.NET is largely syntax compatible with ASP.
Main Menu 10 of 46
ASP.NET Introduction
Main Menu 11 of 46
ASP.NET Introduction
Main Menu 12 of 46
ASP.NET Introduction
Main Menu 13 of 46
ASP.NET Introduction
Main Menu 14 of 46
ASP.NET Introduction
Main Menu 15 of 46
ASP.NET Introduction
Main Menu 16 of 46
ASP.NET Introduction
Main Menu 17 of 46
ASP.NET Introduction
Main Menu 18 of 46
ASP.NET Introduction
Main Menu 19 of 46
ASP.NET Introduction
Main Menu 20 of 46
ASP.NET Introduction
Main Menu 21 of 46
ASP.NET Introduction
Main Menu 22 of 46
ASP.NET Introduction
Language Support
Now let us see how ASP.NET supports these three
languages.
All you have to do is declare which language you
will be using in your ASP.NET page, in the
following syntax at the start of your page.
<%@ Page Language = “VB” %>
<%@ Page Language = “C#” %>
<%@ Page Language = “JScript” %>
VB is the default language for ASP.NET
Main Menu 23 of 46
ASP.NET Introduction
What is HTTP?
HTTP (Hyper Text Transfer Protocol) is used for
transferring the messages between web server and
web browser.
HTTP protocol specifies how messages can be
transported over the TCP/IP network between web
server and web browser.
It specifies the ways in which a browser and Web
server can interact.
Main Menu 24 of 46
ASP.NET Introduction
What is HTTP?
Whenever you retrieve a page from a web site, your
browser opens a connection to a web server for that
site and sends a request.
The web server receives the request and issues a
response.
All communication between a browser and a web
server takes place with the help of request and
response pair.
HTTP protocol is also known as request and
response protocol.
Main Menu 25 of 46
ASP.NET Introduction
What is HTTP?
A browser request has a certain standard structure.
A request might also contain a message body or
entity body.
Every response begins with the status line, contains
several headers, and may contain a message body.
A status line indicates the protocol being used, a
status code, and a text message.
Main Menu 26 of 46
ASP.NET Introduction
Main Menu 27 of 46
ASP.NET Introduction
Main Menu 28 of 46
ASP.NET Introduction
Main Menu 29 of 46
ASP.NET Introduction
Main Menu 30 of 46
ASP.NET Introduction
Main Menu 31 of 46
ASP.NET Introduction
Main Menu 32 of 46
ASP.NET Introduction
Main Menu 33 of 46
ASP.NET Introduction
Main Menu 34 of 46
ASP.NET Introduction
Main Menu 35 of 46
ASP.NET Introduction
Main Menu 36 of 46
ASP.NET Introduction
Main Menu 37 of 46
ASP.NET Introduction
Main Menu 38 of 46
ASP.NET Introduction
Main Menu 39 of 46
ASP.NET Introduction
Main Menu 40 of 46
ASP.NET Introduction
Main Menu 41 of 46
ASP.NET Introduction
Main Menu 42 of 46
ASP.NET Introduction
Summary
Key points covered in this chapter are:
• ASP lacks in performance as it supports scripting languages
only. ASP.NET has been introduced by Microsoft under
.NET framework, to overcome the drawbacks of ASP
• To understand ASP.NET, you should have knowledge of
any language supported in .NET Framework and familiarity
with the environment of Visual Studio.NET.
• ASP.NET provides lots of advantages over ASP e.g.
performance, tool support, rich hierarchy, separation of
code from HTML code, less code, caching etc.
Main Menu 43 of 46
ASP.NET Introduction
Summary
• ASP.NET supports three languages at present i.e. VB, C#,
Jscript.
• HTTP is a protocol, which defines rules to be followed by
the web browser and server.
• ASP.NET page or the Web Forms can be created from a
simple notepad or the Visual Studio.NET IDE and even
from Front Page 2002.
• Configuration of IIS 5.0 Server
• Configuration of Front Page Server extensions.
Main Menu 44 of 46
ASP.NET Introduction
Self Assessment
State True or False
• ASP understands only compile type languages.
• ASP.NET has replaced ASP completely.
• ASP.NET is interpreted at the server.
• ASP supports only 3 objects.
• ASP.NET supports C# and VB.
• ASP.NET supports JavaScript.
• ASP.NET supports caching.
• ASP.NET requires heavy coding from the developer for
any task.
Main Menu 45 of 46
ASP.NET Introduction
Self Assessment
Fill in the blanks
• Caching is used to save ______________ accessed data at
the server end. (Frequently / rarely).
Main Menu 46 of 46