12.1 CommentsTroubleshooting

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  runat="server"/> </body> </html>


ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

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