































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of an asp.net page, its components, and the process of compiling and rendering it. It covers topics such as inline and code behind coding, processing directives, the page class, and page events. The document also discusses the role of iis and the page life cycle.
Typology: Slides
1 / 39
This page cannot be seen from the preview
Don't miss anything!
































ASP Worker (Engine)
Your application Runs
Server
Other applications
User 1 User 2
Session 1 Session 2 Client (Browser)
Request Response
Roughly speaking, an ASP.NET page contains Markup (appears in the .aspx page) Server-side code that the ASP.NET worker executes (appears in the .aspx page or in a separate code behind page) The resulting HTML is sent out to the client (browser) by the asp worker process
There are two ways to do it Inline (code appears in the same file as the .aspx file) Put in a **
They are matching .aspx and .aspx.cs files that are hopelessly tied together @Page directives are important The CodeBehind attribute points to the .cs file The Language attribute identifies the programming language VB / C#
.asax – application files .ascx – ASP user controls .asmx – Web services .aspx – ASP.NET Web pages
Processing directives are used to configure the runtime environment Directives can appear anywhere on a page but best practices dictate that they appear at the beginning of the page Directives begin with <%@ and end with %> Make sure you don’t forget the %>
Processing directive are used to configure the runtime environment Processing directives have the following format: <%@ directive_name attribute=“value” attribute=“value” %>
It can appear only in .aspx pages Attributes are divided into roughly three categories Compilation Page behavior Page output
There are other tools to configure the same options beyond processing directives
CodeFile lists the file containing the VB or C# code for the .aspx page Language describes the programming language for the CodeFile ClassName explicitly sets the name of the class created upon compilation
The Page class provides the basic behavior for an ASP Web page It’s objects allow you to reference The application itself ( Application ) The server itself ( Server ) The HTTP request ( HttpRequest ) The HTTP response ( HttpResponse ) The user’s session ( Session )
First, this topic is very important to getting your ASP applications to work ASP uses the eventing model to Persist state from one postback to the next Create static and dynamic controls Bind control instances to data sources And much more As your book says “state is an illusion of continuity”