12.1 Comments/Troubleshooting

The ASP.NET equivalents of most classic ASP intrinsic objects are returned by properties of the ASP.NET Page class. These properties are shown in Table 12-1.

Table 12-2. ASP.NET equivalents of ASP intrinsic objects

ASP object

Equivalent ASP.NET class

Returned by

Application

HttpApplication and HttpApplicationState

Page.Application property

ASPError

None (ASP.NET uses Structured Exception Handling)

 

ObjectContext

HttpContext

Page.Context property

Request

HttpRequest

Page.Request property

Response

HttpResponse

Page.Response property

Server

HttpServerUtility

Page.Server property

Session

HttpSessionState

Page.Session property

In this chapter, we'll use the following code listing as the basis for most examples. Unless otherwise noted, each example will consist of just the Page_Load event handler for that particular example. Any displayed output messages or return values will be shown as the Text property of the ASP.NET Label control named Message or displayed by calling Response.Write:

<%@ Page Language="vb" %>
<html>
   <head>
      <script runat="server">
         Sub Page_Load( )
            'Example code will go here
         End Sub
      </script>
   </head>
<body>
   <asp:label id="Message" runat="server"/>
</body>
</html>


    Part I: Introduction to ASP.NET
    Part III: Namespace Reference