What is the name of class from which web pages are inherited in ASP.NET?
In ASP.NET, web pages are typically inherited from a class called "Page" that is defined in the System.Web.UI namespace. The "Page" class provides the foundation for creating web pages and contains various properties, methods, and events that are commonly used in web development.
When you create a new web page in ASP.NET, the code-behind file (usually with a .cs or .vb extension) for that page automatically includes a class declaration that inherits from the "Page" class. For example, in C#, the code-behind file might contain a class definition like this:
public partial class MyWebPage : System.Web.UI.Page
{
// Code for the web page goes here
}
In this example, the class "MyWebPage" is derived from the "Page" class, allowing you to access and utilize the functionality provided by the "Page" class within your web page. This inheritance relationship enables you to leverage features like event handling, view state management, and other web-specific functionalities in your ASP.NET web pages.