为什么我们在类声明后使用:System.Web.UI.Page [英] why do we use : System.Web.UI.Page after the class declaration

查看:52
本文介绍了为什么我们在类声明后使用:System.Web.UI.Page的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我们使用:类声明后的System.Web.UI.Page?

why do we use : System.Web.UI.Page after the class declaration??

推荐答案

Page Class



表示从承载ASP.NET Web应用程序的服务器请求的.aspx文件,也称为Web窗体页。



页面类型公开以下成员。

构造函数



名称=页面



描述=初始化Page类的新实例。





公共部分类MyClass:System.Web.UI.Page

{



}



这里的页面类是由继承的类
The Page Class

Represents an .aspx file, also known as a Web Forms page, requested from a server that hosts an ASP.NET Web application.

Where The Page type exposes the following members.
Constructors

Name = Page

Description = Initializes a new instance of the Page class.


Public Partial Class MyClass : System.Web.UI.Page
{

}

Here The Page Class Is Inherited By The Class






System.Web.UI.Page是.net框架类库,它负责让你的文件为aspx,并处理请求,响应服务器。它帮助我们创建自己的页面,其工作方式类似于aspx页面并处理所有事件。如果没有System.Web.UI.Page,您的页面将成为一堆文本,不会处理任何事件。



更多细节

< a href =http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx> http://msdn.microsoft.com/en-us/library/system.web .ui.page.aspx [ ^ ]


请参阅此链接。它声明,

Refer to this link. It states that,
Quote:



系统。 Web.UI 表示从承载ASP.NET Web应用程序的服务器请求的.aspx文件,也称为Web窗体页。



Page类与扩展名为.aspx的文件相关联。这些文件在运行时作为Page对象编译并缓存在服务器内存中。



如果要使用代码隐藏技术创建Web窗体页面,请从这个班。快速应用程序开发(RAD)设计人员(如Microsoft Visual Studio)自动使用此模型创建Web窗体页面。



Page对象充当所有人的命名容器页面中的服务器控件,实现INamingContainer接口的控件除外,或者是实现此接口的控件的子控件。



Page类是一个控件,用作Web应用程序的用户界面,因此应仔细检查以确保遵循编写安全代码和保护应用程序的最佳实践。


System.Web.UI represents an .aspx file, also known as a Web Forms page, requested from a server that hosts an ASP.NET Web application.

The Page class is associated with files that have an .aspx extension. These files are compiled at run time as Page objects and cached in server memory.

If you want to create a Web Forms page using the code-behind technique, derive from this class. Rapid application development (RAD) designers, such as Microsoft Visual Studio, automatically use this model to create Web Forms pages.

The Page object serves as the naming container for all server controls in a page, except those that implement the INamingContainer interface or are child controls of controls that implement this interface.

The Page class is a control that acts as the user interface for your Web application, and as such should be scrutinized to make sure best practices for writing secure code and securing applications are followed.



问候......:笑:


Regards..:laugh:


这篇关于为什么我们在类声明后使用:System.Web.UI.Page的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆