-
AutoEventWireup
An attribute set at the beginning of a program to tie the page’s events to the program.
-
events
Occurs when something happens that an object or web control can sense, like someone clicking a button, or the page load.
-
global.asax
An optional file on the server that, if present, contains program code for handling session and application events.
-
HTML controls
Client-side HTML elements and attributes that provide limited interaction with the user.
-
Wheat is the IsPostBack property
Tells if the page has had a previous round-trip to the server
-
What is a page event
An alert that something is different about the web page. Used to trigger the execution of code.
-
What is the page life cycle
The time between the page request until the page is destroyed.
-
Page Life Cycle: Event 1
PreInit
This is where a test can be made to see if this is a postback page.
-
Page Life Cycle: Event 2
Init
Buttons, labels, or the form itself, called controls, can have their properties read or initialized.
-
Page Life Cycle: Event 3
InitComplete
Changes to the view state can be made here.
-
Page Life Cycle: Event 4
PreLoad
Not a commonly used event.
-
Page Life Cycle: Event 5
Load
This too can be used for setting control properties. It is also used for database connections.
-
Page Life Cycle: Event 6
LoadComplete
Some controls need to be placed on the form before changes to their properties will take effect or before their methods can be run. This is where these changes should take place.
-
Page Life Cycle: Event 7
PreRender
This is the last stage before ASP.NET starts converting everything into a Web page. Make any final changes here.
-
Page Life Cycle: Event 8
SaveStateComplete
The view and control states have been saved at this stage. Placing code here will affect this page, but these changes will not be used for the next postback.
-
Page Life Cycle: Event 10
Unload
This event fires for each control found on the page. Then, the unload event will fire for the page itself. This is commonly used for cleanup methods such as closing files and database connections. This is also where new pages can be called to pop up.
-
Postback property
Used to tell if a page is loading for the first time or just a postback to the server where the load events don't need to run again.
-
Response.Redirect
- Redirects to any URL
- Makes a complete round-trip to the server
- User sees the actual URL
- Does not preserve form data or the query string
- ViewState not applicable
-
Server controls
- Controls processed on the server compiled out of C# or VB.
- All the controls from the toolbox that are not HTML controls.
-
HTML Controls
Client-side HTML elements and attributes that provide limited interaction with the user.
-
Cross Page Posting
- Simpler form of Server.Transfer
- Uses the PostBackURL method of a Web control
- URL changes (complete page cycle)
- Limited to pages on the current site
- ViewState is supported but does not include ViewState variables
-
Server.Transfer
- Only transfers to the current server and only to aspx pages
- Does only a partial round-trip to the server
- The previous page URL is displayed in the address bar
- Preserves form data
- URL doesn’t change
-
User controls
- Controls written by the user.
- Written like a web page but without the html formatting.
- User controls are System.Web.UI.UserControl objects and saved separately with .ascx extensions.
-
Validation controls
Special controls designed specifically for validating user input
-
ViewState object
Stores information about the controls on a website?
-
machine.config
Single file that contains all the required changes to the default settings for the entire .NET system on a given computer.
-
web.config
- Resets the defaults for all Web sites on the machine.
- The web.config files closest to the Web page override all the previous files.
-
app.config
file that sets the defaults for each of the programming languages used in Visual Studio as well as for each application.
|
|