ASP.
Net Web
Pages
[Link] Web Pages
A [Link] web page is divided into multiple
pages
Every web page shares a common set of
resources
[Link] web application is a combination of files,
pages, handlers, modules and executable code
that can be invoked from a virtual directory
[Link] Applications
[Link] file types
File Name Description
.aspx These are [Link] web pages (the .NET equivalent of the
.asp file in an ASP application). They contain the user
interface and, optionally, the underlying application code.
Users request or navigate directly to one of these pages to
start your web application.
.ascx These are [Link] user controls. User controls are similar to
web pages, except that the user can’t access these files
directly. Instead, they must be hosted inside an [Link] web
page. User controls allow you to develop a small piece of
user interface and reuse it in as many web forms
[Link] This is the XML-based configuration file for your [Link]
application. It includes settings for customizing security, state
management, memory management, and much more.
[Link] This is the global application file. You can use this file to
define global variables
.cs These are code-behind files that contain C# code. They
allow you to separate the application logic from the user
interface of a web page.
[Link] Application Directories
Directory Description
App_Browsers Contains .browser files that [Link] uses to identify the
browsers that are using your application and determine
their capabilities. Usually, browser information is
standardized across the entire web server
App_Code Contains source code files that are dynamically compiled
for use in your application.
App_GlobalReso Stores global resources that are accessible to every page in
urces the web application. This directory is used in localization
scenarios, when you need to have a website in more than
one language
App_LocalResou Serves the same purpose as App_GlobalResources, except
rces these resources are accessible to a specific page only
App_WebRefere Stores references to web services, which are remote code
nces routines that a web application can call over a network or
the Internet.
Directory Description
App_Data Stores data, including SQL Server Express database files
App_Themes Stores the themes that are used to standardize and reuse
formatting in your web application
Bin Contains all the compiled .NET components (DLLs) that the
[Link] web application uses
HTML Control Class
HTML Control Properties
The Page Class
Application Events
Event Handling Method Description
Application_Start() Occurs when the application starts, which
is the first time it receives a request from
any user. It doesn’t occur on subsequent
requests. This event is commonly used to
create or cache some initial information
that will be reused later
Application_End() Occurs when the application is shutting
down, generally because the web server
is being restarted.
Application_BeginRequest() Occurs with each request the application
receives, just before the page code is
executed.
Application_EndRequest() Occurs with each request the application
receives, just after the page code is
executed.
Session_Start() Occurs whenever a new user request is
received and a session is started.
Session_End() Occurs when a session times out or is
programmatically ended.