Base class of web-form Page, Properties of class Page...

Base class of web-form Page

As already described, the web-form code is a class derived from the class. This class is responsible for executing all event handlers and generating HTML code that is passed to the user. To create an HTML page that is sent to the user, each control is called with a special method called RenderControl (), which prints out its HTML code to the generated HTML page.

Class Page Properties

The Frame class provides its properties with access to various objects in the query processing context that are created by the runtime. Using these properties, programming of the logic of the web application is performed. In Table. 4.2 shows the main properties and methods of the object Rad.

Table 4.2

Basic object properties and methods Page

Property name



Access to the httpapplicationstate class object that is part of the context that stores the application state and data available to all its users


Access to the httprequest class object that is part of the context that provides access to data that describes the request


Access to the httpresponse class object that is part of the context for writing data to the server's response message


Access to the httpserverutility class object that is part of the context that contains helper methods for processing the request


Access to the object of the httpsessionstate class, which is part of the context, which makes it possible to store in the collection the data available to the current session of the user


Access to the Cache run-time global object that allows temporary caching of data in the cache


Access to the viewstate collection that contains the current view state of the executable web form


Access to a collection of controls located in a web form


An object that supports the IPrincipal interface that contains information about the user who executed the query

The most frequently used objects available in the class are the Response and Request objects.

The Request object (an instance of the HttpRequest class) that is part of the HTTP request processing context contains all the information sent by the browser in the request being processed. Properties and methods Request allow to solve tasks related to user authentication, determine the type of their browser, receive various data and files from them. Below is a list of the main properties of the Request object:

• Browser - to determine the version number of the requesting browser, the ability to support cookies and other service information;

• Form - a collection of values ​​sent using forms;

• Querystring - the collection of pairs "name - value" contained in the query string;

• Files - a collection of files sent by the user (upload);

• Cookies - a collection of cookies retrieved in the request (objects of the HttpCookie class).

To determine the type of client browser, you must use the Browser property of the Request object. For example, the following code includes the type of browser that sent the request to the generated HTTP response:

Response.Write ( 'Your browser is + Request.Browser.Browser);

The Response object (an instance of the HttpResponse class) is used to generate a web application response to a client request. Using the properties and methods of the Response object, you can control the caching of generated HTML pages before sending it to the user, modify the contents of the cookie (HttpCookie class objects), read and write unstructured data sent to the user. The main properties and methods of the Response object are:

• The Cashe property - allows you to cache responses before sending them to the user;

• Cookies property - a collection of cookies that will be sent to users in HTTP responses;

• The Write () method allows you to output text to the generated HTML document.

thematic pictures

Also We Can Offer!

Other services that we offer

If you don’t see the necessary subject, paper type, or topic in our list of available services and examples, don’t worry! We have a number of other academic disciplines to suit the needs of anyone who visits this website looking for help.

How to ...

We made your life easier with putting together a big number of articles and guidelines on how to plan and write different types of assignments (Essay, Research Paper, Dissertation etc)