- Application
- Request
- Response
- Server
- Session
- Context
- Trace
In ASP.NET, there are several major built-in objects that are fundamental to the framework’s functionality. Here’s a list of some of the key ones:
- HttpContext: Represents the current HTTP request and response, providing access to request-specific information such as headers, cookies, and form data.
- HttpRequest: Represents the client’s HTTP request and provides properties and methods to access request data like headers, query string parameters, and form data.
- HttpResponse: Represents the HTTP response that will be sent to the client, providing methods and properties to control aspects of the response such as headers, status codes, and content.
- HttpServerUtility: Provides various utility methods for working with the server environment, such as file operations, executing code on the server, and URL encoding.
- HttpApplication: Represents the global application class for ASP.NET applications and serves as the entry point for handling application-level events such as application start, end, and error handling.
- HttpSessionState: Represents session state information for a user session and allows storing session-specific data that persists across multiple requests from the same client.
- HttpCookieCollection: Represents a collection of cookies associated with the current request or response, allowing you to read, add, and remove cookies.
- Server: Provides utility methods for working with server controls and managing aspects of the server environment within ASP.NET pages and code-behind files.
- Cache: Represents the cache of objects that can be stored in memory to improve performance by reducing the need to recreate or retrieve data frequently.
- Application: Represents the application state, allowing you to store and retrieve global data that is accessible to all users and sessions within the application.
Understanding these built-in objects and how to utilize them effectively is essential for developing robust and efficient ASP.NET applications.