• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/13

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

13 Cards in this Set

  • Front
  • Back
One of the major complaints about Visual Studio .NET 2002 and 2003
One of the major complaints about Visual Studio .NET 2002 and 2003 is that it forced you to use the codebehind
model when developing your ASP.NET pages because it did not understand the code-inline model.
To build an ASP.NET page inline instead of using the
code-behind model
To build an ASP.NET page inline instead of using the
code-behind model, you simply select the page type from the Add New Item dialog and make sure that
the Place Code in Separate File check box is not selected.
It is important to note that the more preferred method is
It is important to note that the more preferred method is the code-behind model rather
than the inline model. This method employs the proper segmentation between
presentation and business logic in many cases.
presentation and business logic:
.aspx.vb /.aspx
The .aspx page using this ASP.NET 4 code-behind model has some attributes in the Page directive that
you should pay attention to.
CodeFile attribute
Inherits attribute
A directive is written in the following format:
<%@ [Directive] [Attribute=Value] ... %>
P.10
Table 1-4 summarizes the attributes available through the @Page directive
if you want to initiate some action when
the end user clicks a button on your Web page, you create a button-click event in your server-side code
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label1.Text = TextBox1.Text
End Sub
The following list shows you all the page events you could use.
➤➤ AbortTransaction
➤➤ CommitTransaction
➤➤ DataBinding
➤➤ Disposed
➤➤ Error
➤➤ Init
➤➤ Load
➤➤ PreRender
➤➤ Unload
➤➤ InitComplete: Indicates the initialization of the page is completed.
➤➤ LoadComplete: Indicates the page has been completely loaded into memory.
➤➤ PreInit: Indicates the moment immediately before a page is initialized.
➤➤ PreLoad: Indicates the moment before a page has been loaded into memory.
➤➤ PreRenderComplete: Indicates the moment directly before a page has been rendered in the browser.
If you create an ASP.NET 4 page and turn on tracing, you can see the order in which the main page events
are initiated. They are fired in the following order:
1. PreInit
2. Init
3. InitComplete
4. PreLoad
5. Load
6. LoadComplete
7. PreRender
8. PreRenderComplete
9. Unload
A postback
A postback is just that — a posting back to the same page. The postback contains all the form
information collected on the initial page for processing if required.
IsPostBack property of the Page class
Because of all the postbacks that can occur with an ASP.NET page, you want to know whether a request
is the "first instance" for a particular page or is a postback from the "same" page. You can make this check by
using the IsPostBack property of the Page class, as shown in the following example:

If Page.IsPostBack = True Then
' Do processing
End If
"or"
If Not Page.IsPostBack Then
' Do processing
End If
To get at a particular control’s value that is
carried over from the previous page
To get at a particular control’s value that is
carried over from the previous page, you simply create an instance of that control type and populate this
instance using the FindControl() method from the PreviousPage property
IsCrossPagePostBack
in Page2.aspx The IsCrossPagePostBack property enables you to check whether the request is from Page1.aspx