ASP.NET
  Home arrow ASP.NET arrow Page 5 - ASP.NET Architecture, Part 1
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

ASP.NET Architecture, Part 1
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 25
    2004-02-23

    Table of Contents:
  • ASP.NET Architecture, Part 1
  • ASP.NET Namespaces
  • System.Web.UI Namespace Classes
  • System.Web.UI Namespace Interface, Enumerations, and Delegates
  • ASP.NET Page Class
  • An ASP.NET Page's Life Cycle
  • Applying Page Directives
  • Code-Behind Feature

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    ASP.NET Architecture, Part 1 - ASP.NET Page Class


    (Page 5 of 8 )

    ASP.NET pages begin as code in a text file with an .aspx extension. They lie within an Internet Information Service (IIS) virtual directory located somewhere on your LAN or on a remote server. Pages are instantiation classes derived from the parent Page class. For example, you can write your code using any text editor such as Notepad or, preferably, Visual Studio .NET. The text file becomes a valid ASP.NET page only when a client sends a request to the server to render the page to the client browser. The page compiles to a class. It is created at runtime as a Page object and is subsequently cached in memory. It naturally follows that the Page object serves as a naming container for all server controls embedded within the page. The only exception to this is those server controls implementing the INamingContainer interface. Examining the Page Class

    ASP.NET functionality lies primarily with the Page class. Every page derives from the Page class, thereby inheriting all the methods and properties the Page class exposes. The following list describes several members of this class.

    1. The ASP objects such as Application, Session, Request, Response, Server, and Context are implemented in ASP.NET as class instances, which are exposed as properties of a specified page.

    2. The Controls collection provides access to the set of controls defined for a specific page. With this collection, you can add or alter controls.

    3. The IsPostBack property is used to determine whether the current request is a GET request or a POST request.

    4. The User property provides information about the logged-in user.

    5. The Cache property enables access to the ASP.NET cache engine. You can use this property to allow data to be cached for later retrieval.

    6. The FindControl property allows you to locate a control in the Controls collection by specifying the ID attribute property.

    7. The ViewState property allows you to store a page’s state in a hidden form field (key-value pair) between client requests.

    8. The ClearChildViewState property allows you to delete view state information for any child controls residing on a page.

    Two methods exist for inheriting from the Page class: the first is adding the @ Page directive to an .aspx file. By doing so, the directive automatically makes available all page properties and methods for any code written on the page.

    <%@ Page Language ="vb"%>

    The second method uses the code-behind feature to inherit from the Page class associated with a particular page by specifying either the Src or Inherits attribute:

    <%@ Page Language="vb" AutoEventWireup="false"
    Codebehind="RegisterForm.aspx.vb"
    Inherits="RegisterForm.WebForm1" %>

    The second method allows ASP.NET to combine the code in the web form’s .aspx file with the code in the code-behind class file and compile both files to a single merged file at compile time.

    Come back this Friday, 27/02/2004, for part two of ASP.NET Architecture. This is chapter six of .NET & J2EE Interoperability, by Dwight Peltzer (McGraw-Hill/Osborne, ISBN 0-07-223054-1, 2004).
    Buy this book now.

    More ASP.NET Articles
    More By McGraw-Hill/Osborne


     

    ASP.NET ARTICLES

    - Developing a Mini ASP.NET AJAX Server Centri...
    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT