Академический Документы
Профессиональный Документы
Культура Документы
Presentati
on
on
ASP . Net
Home CONTENTS
• .NET Framework 3
• Introduction to Asp.Net 4
• Overview 5
• Asp.Net Features 6
• Asp.Net Page structure 9
• Event Handlers 12
• Web Form Page Life Cycle 13
• Script Section 14
• HTTP Handlers 17
• Server Controls 18
• Web Server Controls 19
• Working with Web Objects 21
• Web Services 27
• A Word of Thanks 29
1
Home .NET Framework
Executable
Server
Receives Composes
1 Request
2 Response Server
Resources
Welcome :
Welcome.a
spx
/img
3 Returns Response Data Store
.
.
.
4
Home ASP.NET Features
supports
Other
VB.NET C# JScript languages
Web Application
5
Home Advantages of ASP.NET
Web.config
Welcome Server resources:
Style Sheet
(CSS) Welcome.aspx
FindTitles.aspx
System.aspx
/img
Pubs Database
.
.
.
7
Home Asp.NET page structure
WebForm.aspx WebForm.aspx.cs
Cleanup Page_Unload
12
Home Script section
Script section
C# Jscript
VB
13
Home Client side script
processed
They are builtby
• an.NET
using
•The Integrate with the ASP.NET Request
HttpHandler
Pipeline
The Pipeline is over 20 events that
For example, ASPX pages are
o
ASPX
needed. Page HttpHandler.
URL Rewriting
You ocan create your own
o
Security
HttpHandler
o
Logging to render
content based on the request
16
Home server Controls
1. Flexible controls.
2. Not many features.
3. Used when the form runs in the client
HTML controls side and user does not need many
features to be incorporated.
4. Useful when porting ASP applications
to ASP.NET.
Namespaces
Using the Request Object
Using the Response Object
Retaining value of Variables
Session and Application State Variables
Configuration Files
Web.config File
20
Home Working with web objects
Namespaces :
Page
• The Page Object Controls your
Cache
Application’s user Interface. The Page object
has properties and methods that provide
access to other objects in the user interface.
Controls
Request
• The Page base class provides the core
methods and properties that you use
Response
frequently when programming Web forms.
Server
Session
Trace
21
Home Working with web objects
Request
The Request Object contains the
information sent by the client
Browser
browser when a page is
Determine requested
the Capabilities of
the Browser making the
Client
from the application.
Certificates TheBrowser
request. Requestproperties
provide the browser version
has properties
Cookies
and methods
Authenticate
number, that
the Client
determine if it
supports cookies, and supply
provide access to otherother objects
Information. that
Get Information from the
Topic
Hom
make up the request,
Files as
Read
client shown
inand
theWrite
form to inraw
of the
Cookies
data sent in the request
e the figure. Get Files that are Uploaded
InputStream by the Client
The HttpRequest object
encapsulates information that the
22
Home Working with web objects
Response
The Response Object contains the
information sent by the client
Cache
browser when a page is requested
from the application.Determine
The Request
how the server
Cookies caches responses before
has properties and methods
they
Set theare
Content that
sent to
of the clientto
cookies
provide access
Output
to other objects
send to the client
Topic
Hom
that make up the request,Get or setas
the raw data
returned to the client as the
e shown in the figure. response
“Global.asaVariables
Page-level
x” Object-level
*String
Contains configuration
ourname settings for all
= “nobel"; Application
applications. ("Welcome " +
Response.Write Level
ourname); Session Level
* Stores event handlers for all events
Configuration files
q
Configuration files are stored in plain text, which enables
Configuration Files
web developers
to edit
q The themconfiguration
ASP.NET in any text-editor of their
files are choice.
written in XML, which
enables the
developer to modify them using an XML parser too
q If the configuration settings are changed, they are
Type of Tag Rule
automatically detected
by theattribute Camel-case
system. The
Machine.Config
Tag and server: need
The first character
Web.Config
not of a tag name is
be restarted.
lowercase and the first letter of any subsequent
names
Server Configuration words
File are in uppercase.
q Each directory can actually override the configuration of
Pascal-case : The first character is uppercase and the
the previous first letterContains
of any subsequent
propertyconcatenated
settings words
just is
Attribute values
directory by creating its own configuration file.
It sets properties
Topic applicable
uppercase.
q The clients cannot view the contents
Exceptions
for being
a single
of true Directory
and false,
application
the or which
configuration
are in lowercase. Sub
Homfor the entire server,and even may be a single Directo directory
e files using a
is an XML based
browser, fileensuring security.
thus, of an application. ry
27
Home Working with web objects
Configuration files
Web.Config File
Set the
Structure
<configuration> Property
<configSections>
Values
<section name="sectionSettings" Root />
type="Class"
This web.config
<sectionGroup is an XML
name="sectionGroup">Directory
based
<section
An Web Pages
file is configured
name="sectionSettings"
application
type="Class" /> Of
using the ‘web.config’ file which residesApplication
</sectionGroup>
in Application
the root directory
Configuration
of the application.
</configSections>
File
<section name="sectionSettings" type="Class" />
<sectionGroup> ‘Web Config’
<sectionSettings attribute="someValue" />
‘ Web.Config’
<sectionSettings SomeAttribute="SomeValue">
Topic
Hom <element attribute="value">
</sectionSettings>
e
</sectionGroup>
</configuration>
Home A word of thanks . . .
Thanking You . . .
Amit Sharma
Pawan Mishra
Sayanta Basu
Sribas Das
Tanmoy Guha