.NET API Documentation

Namespace: System.Web

Provides classes and interfaces for developing ASP.NET Web applications.

Classes

HttpApplication

The base class for all ASP.NET applications. This class provides the entry point for processing incoming HTTP requests and is responsible for initializing and disposing of the application.

public HttpApplication : IHttpModule

HttpContext

Encapsulates all HTTP-specific information about an individual server request and the response that is being sent back to the client.

public HttpContext : IDisposable

Key Properties:

  • Request: Gets information about the incoming HTTP request.
  • Response: Gets information about the outgoing HTTP response.
  • User: Gets the authenticated user for the request.

HttpRequest

Represents the incoming HTTP request data and properties.

public HttpRequest

Key Properties:

  • HttpMethod: Gets the HTTP method used by the client.
  • Url: Gets the URL of the request.
  • Form: Gets a collection of form data.
  • QueryString: Gets a collection of URL query string values.

HttpResponse

Represents the outgoing HTTP response data and properties.

public HttpResponse

Key Properties:

  • StatusCode: Gets or sets the HTTP status code for the response.
  • ContentType: Gets or sets the HTTP MIME type of the response.
  • Write(string): Writes content to the response stream.

HttpServerUtility

Provides utility methods for the server, such as HTML encoding and URL encoding.

public HttpServerUtility

Key Methods:

  • UrlEncode(string): Encodes a string for URL transmission.
  • HtmlEncode(string): Encodes a string for HTML transmission.
Interfaces

IHttpHandler

Defines the contract for implementing HTTP handlers, which process HTTP requests and generate responses.

public IHttpHandler

IHttpModule

Defines the contract for implementing HTTP modules, which can process requests and responses globally.

public IHttpModule
Enums

HttpCookieMode

Specifies how cookies are used for session management.

public enum HttpCookieMode

Values:

  • UseCookies
  • UseUri