Summary

IOTA^_^    

Sams Teach Yourself ASP.NET in 21 Days, Second Edition
By Chris Payne
Table of Contents
Day 4.  Using ASP.NET Objects with C# and VB.NET


Objects have properties and methods to describe them. Many of these properties and methods require instances of the objects, but static members do not.

The Response object allows server-to-browser communication, while the Request object allows browser-to-server communication. The Response object is useful for displaying information to the user or redirecting her, while Request allows you to discover information about the client.

The HttpCookie object provides mechanisms for reading and writing cookies, mainly through the Response and Request objects. Remember that cookies are stored on the client's computer, so they don't use up valuable server resources.

The Page object represents the ASP.NET page. The Load event of this object is very useful, and you'll be using it quite often from now on.

The Session object stores information about a user's current session. You can keep personal information in Session variables, such as usernames or site preferences. Session variables can often speed up performance tremendously, so weigh this methods of maintaining user information versus your server resources wisely.

The HttpApplication object represents an ASP.NET application, which includes all files and pages in a virtual directory and the directories below it. This object has some useful events that you'll look into on Day 18. It can also be used to store application-wide variables.

Finally, the HttpServerUtility object provides additional methods that help developers process user requests. These include formatting strings, redirecting users, controlling script execution, and creating objects.

Today's lesson covered a lot of material about ASP.NET objects. Tomorrow you're going to look at Web forms, a new framework for building interactive user interfaces with ASP.NET. This framework provides a number of additional objects, such as HTML Server Controls and Validation Controls.


    IOTA^_^    
    Top


    Sams Teach Yourself ASP. NET in 21 Days
    Sams Teach Yourself ASP.NET in 21 Days (2nd Edition)
    ISBN: 0672324458
    EAN: 2147483647
    Year: 2003
    Pages: 307
    Authors: Chris Payne

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net