Page Page Page Page Class

定义

表示一个从托管 ASP.NET Web 应用程序的服务器请求的 .aspx 文件(也称为 Web 窗体页)。Represents an .aspx file, also known as a Web Forms page, requested from a server that hosts an ASP.NET Web application.

public ref class Page : System::Web::UI::TemplateControl, System::Web::IHttpHandler
public class Page : System.Web.UI.TemplateControl, System.Web.IHttpHandler
type Page = class
    inherit TemplateControl
    interface IHttpHandler
Public Class Page
Inherits TemplateControl
Implements IHttpHandler
继承
派生
实现

示例

包含源代码的 Visual Studio Web 站点项目是可随附于本主题:下载A Visual Studio Web site project with source code is available to accompany this topic: Download.

下面的代码示例演示如何将Page在代码隐藏页模型中使用类。The following code example demonstrates how the Page class is used in the code-behind page model. 请注意,代码隐藏源文件声明继承自基本页类的分部类。Note that the code-behind source file declares a partial class that inherits from a base page class. 基本页类可以是Page,也可以是另一个类派生自PageThe base page class can be Page, or it can be another class that derives from Page. 此外,请注意,分部类允许要使用而无需页面上定义的控件定义为字段成员的代码隐藏文件。Furthermore, note that the partial class allows the code-behind file to use controls defined on the page without the need to define them as field members.

using System;

public partial class MyCodeBehindCS : System.Web.UI.Page
{     
    protected void Page_Load(object sender, EventArgs e)
    {

        // Place page-specific code here.


    }

    // Define a handler for the button click.
    protected void SubmitBtn_Click(object sender, EventArgs e)
    {	

        MySpan.InnerHtml = "Hello, " + MyTextBox.Text + ".";

    }
}
Imports System

Partial Class MyCodeBehindVB
    Inherits System.Web.UI.Page


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        ' Place page-specific code here.

    End Sub

    ' Define a handler for the button click.
    Protected Sub SubmitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyButton.Click

        MySpan.InnerHtml = "Hello, " + MyTextBox.Text + "."

    End Sub

End Class

下面的代码示例显示了对应于前面的代码隐藏源文件的.aspx 文件。The following code example shows the .aspx file that corresponds to the preceding code-behind source file.

重要

此示例具有一个接受用户输入的文本框,这是一个潜在的安全威胁。This example has a text box that accepts user input, which is a potential security threat. 默认情况下,ASP.NET 网页验证用户输入是否不包含脚本或 HTML 元素。By default, ASP.NET Web pages validate that user input does not include script or HTML elements. 有关详细信息,请参阅脚本侵入概述For more information, see Script Exploits Overview.

<%@ Page Language="C#" CodeFile="pageexample.aspx.cs" Inherits="MyCodeBehindCS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Page Class Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <table>
          <tr>
            <td> Name: </td>
            <td> <asp:textbox id="MyTextBox" runat="server"/> </td>
          </tr>
          <tr>
             <td></td>
             <td><asp:button id="MyButton" text="Click Here" onclick="SubmitBtn_Click" runat="server"/></td>
          </tr>
          <tr>
             <td></td>
             <td><span id="MySpan" runat="server" /></td>
          </tr>
       </table>     
    </div>
    </form>
</body>
</html>
<%@ Page Language="VB" CodeFile="pageexample.aspx.vb" Inherits="MyCodeBehindVB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Page Class Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <table>
          <tr>
            <td> Name: </td>
            <td> <asp:textbox id="MyTextBox" runat="server"/> </td>
          </tr>
          <tr>
             <td></td>
             <td><asp:button id="MyButton" text="Click Here" onclick="SubmitBtn_Click" runat="server"/></td>
          </tr>
          <tr>
             <td></td>
             <td><span id="MySpan" runat="server" /></td>
          </tr>
       </table>         
    </div>
    </form>
</body>
</html>

必须使用指令并使用InheritsCodeFile属性链接到.aspx 文件的代码隐藏文件。You must use the directive and use the Inherits and CodeFile attributes to link the code-behind file to the .aspx file. 在此示例中,Inherits属性指示MyCodeBehind类和CodeFile属性指示包含类的特定于语言的文件的路径。In this example, the Inherits attribute indicates the MyCodeBehind class and the CodeFile attribute indicates the path to the language-specific file that contains the class.

下面的代码示例演示了单文件页模型以及如何访问IsPostBack属性和Response属性的PageThe following code example demonstrates the single-file page model and how to access the IsPostBack property and the Response property of the Page.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

  protected void Page_Load(object sender, EventArgs e)
  {
    StringBuilder sb = new StringBuilder();
    
    if (Page.IsPostBack)
      sb.Append("You posted back to the page.<br />");

    sb.Append("The host address is " + Page.Request.UserHostAddress + ".<br />");
    sb.Append("The page title is \"" + Page.Header.Title + "\".");

    PageMessage.Text = sb.ToString();

  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Page Class Example</title>
</head>
<body>
    <form id="form1" 
          runat="server">
    <div>
    <asp:Label id="PageMessage" 
               runat="server"/>
    <br /> <br />
    <asp:Button id="PageButton"
                Text="PostBack"
                runat="server" />
    </div>
    </form>
</body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    Dim sb As New StringBuilder()
    
    If (Page.IsPostBack) Then
      
      sb.Append("You posted back to the page.<br />")
    
    End If
    
    sb.Append("The host address is " + Page.Request.UserHostAddress + ".<br />")
    sb.Append("The page title is """ + Page.Header.Title + """.")
    
    PageMessage.Text = sb.ToString()
    
  End Sub
  
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Page Class Example</title>
</head>
<body>
    <form id="form1" 
          runat="server">
    <div>
    <asp:Label id="PageMessage" 
               runat="server"/>
    <br /> <br />
    <asp:Button id="PageButton"
                Text="PostBack"
                runat="server" />    
    </div>
    </form>
</body>
</html>

注解

Page类是与.aspx 扩展名的文件相关联。The Page class is associated with files that have an .aspx extension. 这些文件在运行时作为编译Page对象,并在服务器内存中缓存。These files are compiled at run time as Page objects and cached in server memory.

如果你想要创建使用代码隐藏技术的 Web 窗体页,从此类派生。If you want to create a Web Forms page using the code-behind technique, derive from this class. 快速应用程序开发 (RAD) 设计器,如 Microsoft Visual Studio 会自动使用此模型创建 Web 窗体页。Rapid application development (RAD) designers, such as Microsoft Visual Studio, automatically use this model to create Web Forms pages.

Page对象用作页上,除了实现中的所有服务器控件的命名容器INamingContainer接口或是实现此接口的控件的子控件。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.

Page类是可作为 Web 应用程序,用户界面,这种情况下,应进行审查以确保最佳实践编写安全代码和保护应用程序所遵循的控件。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. 有关这些主题的常规信息,请参阅概述的 Web 应用程序安全威胁NIB:安全策略最佳实践,并关键安全概念For general information on these topics, see Overview of Web Application Security Threats, NIB: Security Policy Best Practices, and Key Security Concepts. 有关更具体的信息,请参阅保护标准控件如何:显示安全错误消息如何:防止通过应用 HTML 编码为字符串的 Web 应用程序中的脚本攻击,并验证控件简介For more specific information, see Securing Standard Controls, How to: Display Safe Error Messages, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to the Validation Controls.

构造函数

Page() Page() Page() Page()

初始化 Page 类的新实例。Initializes a new instance of the Page class.

字段

postEventArgumentID postEventArgumentID postEventArgumentID postEventArgumentID

一个定义呈现的页中的 EVENTARGUMENT 隐藏字段的字符串。A string that defines the EVENTARGUMENT hidden field in the rendered page.

postEventSourceID postEventSourceID postEventSourceID postEventSourceID

一个定义呈现的页中的 EVENTTARGET 隐藏字段的字符串。A string that defines the EVENTTARGET hidden field in the rendered page.

属性

Adapter Adapter Adapter Adapter

获取控件的浏览器特定适配器。Gets the browser-specific adapter for the control.

(Inherited from Control)
Application Application Application Application

为当前 Web 请求获取 HttpApplicationState 对象。Gets the HttpApplicationState object for the current Web request.

AppRelativeTemplateSourceDirectory AppRelativeTemplateSourceDirectory AppRelativeTemplateSourceDirectory AppRelativeTemplateSourceDirectory

获取或设置包含该控件的 PageUserControl 对象的应用程序相对虚拟目录。Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.

(Inherited from Control)
AppRelativeVirtualPath AppRelativeVirtualPath AppRelativeVirtualPath AppRelativeVirtualPath

获取或设置从中解析和编译控件的文件的相对于应用程序的虚拟目录路径。Gets or sets the application-relative, virtual directory path to the file from which the control is parsed and compiled.

(Inherited from TemplateControl)
AspCompatMode AspCompatMode AspCompatMode AspCompatMode

设置一个值,它指示页是否可在单线程单元 (STA) 线程上执行。Sets a value indicating whether the page can be executed on a single-threaded apartment (STA) thread.

AsyncMode AsyncMode AsyncMode AsyncMode

设置一个指示对页进行同步还是异步处理的值。Sets a value indicating whether the page is processed synchronously or asynchronously.

AsyncTimeout AsyncTimeout AsyncTimeout AsyncTimeout

获取或设置一个值,它指示处理异步任务时使用的超时间隔。Gets or sets a value indicating the time-out interval used when processing asynchronous tasks.

AutoHandlers AutoHandlers AutoHandlers AutoHandlers

ASP.NET 2.0 中已弃用 AutoHandlers 属性。The AutoHandlers property has been deprecated in ASP.NET NET 2.0. 它是由生成的类使用的,不应在代码中使用。It is used by generated classes and is not intended for use within your code.

(Inherited from TemplateControl)
AutoPostBackControl AutoPostBackControl AutoPostBackControl AutoPostBackControl

获取或设置页中用于执行回发的控件。Gets or sets the control in the page that is used to perform postbacks.

BindingContainer BindingContainer BindingContainer BindingContainer

获取包含该控件的数据绑定的控件。Gets the control that contains this control's data binding.

(Inherited from Control)
Buffer Buffer Buffer Buffer

设置指示是否对页输出进行缓冲处理的值。Sets a value indicating whether the page output is buffered.

Cache Cache Cache Cache

获取与该页驻留的应用程序关联的 Cache 对象。Gets the Cache object associated with the application in which the page resides.

ChildControlsCreated ChildControlsCreated ChildControlsCreated ChildControlsCreated

获取一个值,该值指示是否已创建服务器控件的子控件。Gets a value that indicates whether the server control's child controls have been created.

(Inherited from Control)
ClientID ClientID ClientID ClientID

获取由 ASP.NET 生成的 HTML 标记的控件 ID。Gets the control ID for HTML markup that is generated by ASP.NET.

(Inherited from Control)
ClientIDMode ClientIDMode ClientIDMode ClientIDMode

获取或设置用于生成 ClientID 属性值的算法。Gets or sets the algorithm that is used to generate the value of the ClientID property.

(Inherited from Control)
ClientIDSeparator ClientIDSeparator ClientIDSeparator ClientIDSeparator

获取一个字符值,该值表示 ClientID 属性中使用的分隔符字符。Gets a character value representing the separator character used in the ClientID property.

(Inherited from Control)
ClientQueryString ClientQueryString ClientQueryString ClientQueryString

获取请求的 URL 的查询字符串部分。Gets the query string portion of the requested URL.

ClientScript ClientScript ClientScript ClientScript

获取用于管理脚本、注册脚本和向页添加脚本的 ClientScriptManager 对象。Gets a ClientScriptManager object used to manage, register, and add script to the page.

ClientTarget ClientTarget ClientTarget ClientTarget

获取或设置一个值,该值使您得以重写对浏览器功能的自动检测,并指定针对特定的浏览器客户端页的呈现方式。Gets or sets a value that allows you to override automatic detection of browser capabilities and to specify how a page is rendered for particular browser clients.

CodePage CodePage CodePage CodePage

设置当前 Page 的代码页标识符。Sets the code page identifier for the current Page.

ContentType ContentType ContentType ContentType

设置与页关联的 HttpResponse 对象的 HTTP MIME 类型。Sets the HTTP MIME type for the HttpResponse object associated with the page.

Context Context Context Context

获取与该页关联的 HttpContext 对象。Gets the HttpContext object associated with the page.

Controls Controls Controls Controls

获取 ControlCollection 对象,该对象表示 UI 层次结构中的指定服务器控件的子控件。Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.

(Inherited from Control)
Culture Culture Culture Culture

设置与页关联的 Thread 对象的区域性 ID。Sets the culture ID for the Thread object associated with the page.

DataItemContainer DataItemContainer DataItemContainer DataItemContainer

如果命名容器实现 IDataItemContainer,则获取对命名容器的引用。Gets a reference to the naming container if the naming container implements IDataItemContainer.

(Inherited from Control)
DataKeysContainer DataKeysContainer DataKeysContainer DataKeysContainer

如果命名容器实现 IDataKeysControl,则获取对命名容器的引用。Gets a reference to the naming container if the naming container implements IDataKeysControl.

(Inherited from Control)
DesignMode DesignMode DesignMode DesignMode

获取一个值,该值指示是否正在使用设计图面上的一个控件。Gets a value indicating whether a control is being used on a design surface.

(Inherited from Control)
EnableEventValidation EnableEventValidation EnableEventValidation EnableEventValidation

获取或设置一个值,该值指示页面验证回发事件,还是验证回调事件。Gets or sets a value indicating whether the page validates postback and callback events.

EnableTheming EnableTheming EnableTheming EnableTheming

获取或设置一个布尔值,该值指示主题是否应用于派生自 TemplateControl 类的控件。Gets or sets a Boolean value indicating whether themes apply to the control that is derived from the TemplateControl class.

(Inherited from TemplateControl)
EnableViewState EnableViewState EnableViewState EnableViewState

获取或设置一个值,该值指示当前页请求结束时该页是否保持其视图状态以及它包含的任何服务器控件的视图状态。Gets or sets a value indicating whether the page maintains its view state, and the view state of any server controls it contains, when the current page request ends.

EnableViewStateMac EnableViewStateMac EnableViewStateMac EnableViewStateMac

获取或设置一个值,该值指示从客户端回发页时,ASP.NET 是否应在页的视图状态下检查消息身份验证代码 (MAC)。Gets or sets a value indicating whether ASP.NET should check message authentication codes (MAC) in the page's view state when the page is posted back from the client.

ErrorPage ErrorPage ErrorPage ErrorPage

获取或设置错误页,在发生未处理的页异常的事件时请求浏览器将被重定向到该页。Gets or sets the error page to which the requesting browser is redirected in the event of an unhandled page exception.

Events Events Events Events

获取控件的事件处理程序委托列表。Gets a list of event handler delegates for the control. 此属性是只读的。This property is read-only.

(Inherited from Control)
FileDependencies FileDependencies FileDependencies FileDependencies

设置当前的 HttpResponse 对象所依赖的文件的数组。Sets an array of files that the current HttpResponse object is dependent upon.

Form Form Form Form

获取页的 HTML 窗体。Gets the HTML form for the page.

HasChildViewState HasChildViewState HasChildViewState HasChildViewState

获取一个值,该值指示当前服务器控件的子控件是否具有任何已保存的视图状态设置。Gets a value indicating whether the current server control's child controls have any saved view-state settings.

(Inherited from Control)
Header Header Header Header

在页声明中用 head 定义了 runat=server 元素的情况下获取页的文档标头。Gets the document header for the page if the head element is defined with a runat=server in the page declaration.

IControlBuilderAccessor.ControlBuilder IControlBuilderAccessor.ControlBuilder IControlBuilderAccessor.ControlBuilder IControlBuilderAccessor.ControlBuilder

有关此成员的说明,请参阅 ControlBuilderFor a description of this member, see ControlBuilder.

(Inherited from Control)
IControlDesignerAccessor.UserData IControlDesignerAccessor.UserData IControlDesignerAccessor.UserData IControlDesignerAccessor.UserData

有关此成员的说明,请参见 UserDataFor a description of this member, see UserData.

(Inherited from Control)
ID ID ID ID

获取或设置 Page 类的特定实例的标识符。Gets or sets an identifier for a particular instance of the Page class.

IDataBindingsAccessor.DataBindings IDataBindingsAccessor.DataBindings IDataBindingsAccessor.DataBindings IDataBindingsAccessor.DataBindings

有关此成员的说明,请参见 DataBindingsFor a description of this member, see DataBindings.

(Inherited from Control)
IDataBindingsAccessor.HasDataBindings IDataBindingsAccessor.HasDataBindings IDataBindingsAccessor.HasDataBindings IDataBindingsAccessor.HasDataBindings

有关此成员的说明,请参阅 HasDataBindingsFor a description of this member, see HasDataBindings.

(Inherited from Control)
IdSeparator IdSeparator IdSeparator IdSeparator

获取在为页上的控件构造唯一 ID 时用于分隔控件标识符的字符串。Gets the character used to separate control identifiers when building a unique ID for a control on a page.

IExpressionsAccessor.Expressions IExpressionsAccessor.Expressions IExpressionsAccessor.Expressions IExpressionsAccessor.Expressions

有关此成员的说明,请参见 ExpressionsFor a description of this member, see Expressions.

(Inherited from Control)
IExpressionsAccessor.HasExpressions IExpressionsAccessor.HasExpressions IExpressionsAccessor.HasExpressions IExpressionsAccessor.HasExpressions

有关此成员的说明,请参见 HasExpressionsFor a description of this member, see HasExpressions.

(Inherited from Control)
IsAsync IsAsync IsAsync IsAsync

获取一个值,该值指示是否异步处理页。Gets a value indicating whether the page is processed asynchronously.

IsCallback IsCallback IsCallback IsCallback

获取一个值,该值指示页请求是否是回调的结果。Gets a value that indicates whether the page request is the result of a callback.

IsChildControlStateCleared IsChildControlStateCleared IsChildControlStateCleared IsChildControlStateCleared

获取一个值,该值指示该控件中包含的控件是否具有控件状态。Gets a value indicating whether controls contained within this control have control state.

(Inherited from Control)
IsCrossPagePostBack IsCrossPagePostBack IsCrossPagePostBack IsCrossPagePostBack

获取一个值,该值指示跨页回发中是否涉及该页。Gets a value indicating whether the page is involved in a cross-page postback.

IsPostBack IsPostBack IsPostBack IsPostBack

获取一个值,该值指示页是第一次呈现还是为了响应回发而加载。Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.

IsPostBackEventControlRegistered IsPostBackEventControlRegistered IsPostBackEventControlRegistered IsPostBackEventControlRegistered

获取一个值,该值指示页中执行回发的控件是否经过注册。Gets a value that indicates whether the control in the page that performs postbacks has been registered.

IsReusable IsReusable IsReusable IsReusable

获取一个值,该值指示 Page 对象是否可重用。Gets a value indicating whether the Page object can be reused.

IsTrackingViewState IsTrackingViewState IsTrackingViewState IsTrackingViewState

获取一个值,用于指示服务器控件是否会将更改保存到其视图状态中。Gets a value that indicates whether the server control is saving changes to its view state.

(Inherited from Control)
IsValid IsValid IsValid IsValid

获取一个值,该值指示页验证是否成功。Gets a value indicating whether page validation succeeded.

IsViewStateEnabled IsViewStateEnabled IsViewStateEnabled IsViewStateEnabled

获取一个值,该值指示是否为该控件启用了视图状态。Gets a value indicating whether view state is enabled for this control.

(Inherited from Control)
Items Items Items Items

获取存储在页上下文中的对象的列表。Gets a list of objects stored in the page context.

LCID LCID LCID LCID

设置与页关联的 Thread 对象的区域设置标识符。Sets the locale identifier for the Thread object associated with the page.

LoadViewStateByID LoadViewStateByID LoadViewStateByID LoadViewStateByID

获取一个值,该值指示控件是否通过 ID 而不是索引参与加载其视图状态。Gets a value indicating whether the control participates in loading its view state by ID instead of index.

(Inherited from Control)
MaintainScrollPositionOnPostBack MaintainScrollPositionOnPostBack MaintainScrollPositionOnPostBack MaintainScrollPositionOnPostBack

获取或设置一个值,该值指示是否在回发后将用户返回到客户端浏览器中的同一位置。Gets or sets a value indicating whether to return the user to the same position in the client browser after postback. 此属性取代了已过时的 SmartNavigation 属性。This property replaces the obsolete SmartNavigation property.

Master Master Master Master

获取确定页的整体外观的母版页。Gets the master page that determines the overall look of the page.

MasterPageFile MasterPageFile MasterPageFile MasterPageFile

获取或设置母版页的虚拟路径。Gets or sets the virtual path of the master page.

MaxPageStateFieldLength MaxPageStateFieldLength MaxPageStateFieldLength MaxPageStateFieldLength

获取或设置页状态字段的最大长度。Gets or sets the maximum length for the page's state field.

MetaDescription MetaDescription MetaDescription MetaDescription

获取或设置“描述”meta 元素的内容。Gets or sets the content of the "description" meta element.

MetaKeywords MetaKeywords MetaKeywords MetaKeywords

获取或设置“关键字”meta 元素的内容。Gets or sets the content of the "keywords" meta element.

ModelBindingExecutionContext ModelBindingExecutionContext ModelBindingExecutionContext ModelBindingExecutionContext

获取模型绑定器的执行上下文。Gets the model binding execution context.

ModelState ModelState ModelState ModelState

获取包含模型状态和模型绑定验证状态的模型状态字典对象。Gets the model state dictionary object that contains the state of the model and of model-binding validation.

NamingContainer NamingContainer NamingContainer NamingContainer

获取对服务器控件的命名容器的引用,此引用创建唯一的命名空间,以区分具有相同 ID 属性值的服务器控件。Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.

(Inherited from Control)
Page Page Page Page

获取对包含服务器控件的 Page 实例的引用。Gets a reference to the Page instance that contains the server control.

(Inherited from Control)
PageAdapter PageAdapter PageAdapter PageAdapter

获取为特定的请求浏览器呈现页的适配器。Gets the adapter that renders the page for the specific requesting browser.

PageStatePersister PageStatePersister PageStatePersister PageStatePersister

获取与该页关联的 PageStatePersister 对象。Gets the PageStatePersister object associated with the page.

Parent Parent Parent Parent

获取对页 UI 层次结构中服务器控件的父控件的引用。Gets a reference to the server control's parent control in the page control hierarchy.

(Inherited from Control)
PreviousPage PreviousPage PreviousPage PreviousPage

获取向当前页传输控件的页。Gets the page that transferred control to the current page.

RenderingCompatibility RenderingCompatibility RenderingCompatibility RenderingCompatibility

获取一个值,该值指定呈现的 HTML 将与之兼容的 ASP.NET 版本。Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with.

(Inherited from Control)
Request Request Request Request

获取所请求的页面的 HttpRequest 对象。Gets the HttpRequest object for the requested page.

Response Response Response Response

获取与 Page 对象关联的 HttpResponse 对象。Gets the HttpResponse object associated with the Page object. 使用此对象,可以将 HTTP 响应数据发送到客户端,并包含此响应的相关信息。This object allows you to send HTTP response data to a client and contains information about that response.

ResponseEncoding ResponseEncoding ResponseEncoding ResponseEncoding

设置当前的 HttpResponse 对象的编码语言。Sets the encoding language for the current HttpResponse object.

RouteData RouteData RouteData RouteData

获取当前 RouteData 实例的 RequestContext 值。Gets the RouteData value of the current RequestContext instance.

Server Server Server Server

获取 Server 对象,它是 HttpServerUtility 类的实例。Gets the Server object, which is an instance of the HttpServerUtility class.

Session Session Session Session

获取 ASP.NET 提供的当前 Session 对象。Gets the current Session object provided by ASP.NET.

Site Site Site Site

获取容器信息,该容器在呈现于设计图面上时承载当前控件。Gets information about the container that hosts the current control when rendered on a design surface.

(Inherited from Control)
SkinID SkinID SkinID SkinID

获取或设置要应用于控件的外观。Gets or sets the skin to apply to the control.

(Inherited from Control)
SkipFormActionValidation SkipFormActionValidation SkipFormActionValidation SkipFormActionValidation

获取或设置一个值,该值指示是否已对查询字符串字段进行验证。Gets or sets a value that indicates whether the query string value is validated.

SmartNavigation SmartNavigation SmartNavigation SmartNavigation

获取或设置指示是否启用了智能导航的值。Gets or sets a value indicating whether smart navigation is enabled. 此属性已弃用。This property is deprecated.

StyleSheetTheme StyleSheetTheme StyleSheetTheme StyleSheetTheme

获取或设置页面生命周期早期适用于页面的主题的名称。Gets or sets the name of the theme that is applied to the page early in the page life cycle.

SupportAutoEvents SupportAutoEvents SupportAutoEvents SupportAutoEvents

获取一个值,该值指示 TemplateControl 控件是否支持自动事件。Gets a value indicating whether the TemplateControl control supports automatic events.

(Inherited from TemplateControl)
TemplateControl TemplateControl TemplateControl TemplateControl

获取或设置对包含该控件的模板的引用。Gets or sets a reference to the template that contains this control.

(Inherited from Control)
TemplateSourceDirectory TemplateSourceDirectory TemplateSourceDirectory TemplateSourceDirectory

获取包含当前服务器控件的 PageUserControl 的虚拟目录。Gets the virtual directory of the Page or UserControl that contains the current server control.

(Inherited from Control)
Theme Theme Theme Theme

获取或设置页主题的名称。Gets or sets the name of the page theme.

Title Title Title Title

获取或设置该页标题。Gets or sets the title for the page.

Trace Trace Trace Trace

为当前 Web 请求获取 TraceContext 对象。Gets the TraceContext object for the current Web request.

TraceEnabled TraceEnabled TraceEnabled TraceEnabled

设置一个值,该值指示是否为 Page 对象启用跟踪。Sets a value indicating whether tracing is enabled for the Page object.

TraceModeValue TraceModeValue TraceModeValue TraceModeValue

设置跟踪语句在页中的显示模式。Sets the mode in which trace statements are displayed on the page.

TransactionMode TransactionMode TransactionMode TransactionMode

设置该页的事务支持的级别。Sets the level of transaction support for the page.

UICulture UICulture UICulture UICulture

设置与页关联的 Thread 对象的用户界面 (UI) ID。Sets the user interface (UI) ID for the Thread object associated with the page.

UniqueFilePathSuffix UniqueFilePathSuffix UniqueFilePathSuffix UniqueFilePathSuffix

获取要追加到用于缓存浏览器的文件路径的唯一后缀。Gets a unique suffix to append to the file path for caching browsers.

UniqueID UniqueID UniqueID UniqueID

获取服务器控件的唯一的、以分层形式限定的标识符。Gets the unique, hierarchically qualified identifier for the server control.

(Inherited from Control)
UnobtrusiveValidationMode UnobtrusiveValidationMode UnobtrusiveValidationMode UnobtrusiveValidationMode

获取或设置一个值,该值指示不显眼的 JavaScript 是否用于客户端验证。Gets or sets a value that indicates whether unobtrusive JavaScript is used for client-side validation.

User User User User

获取有关发出页请求的用户的信息。Gets information about the user making the page request.

ValidateRequestMode ValidateRequestMode ValidateRequestMode ValidateRequestMode

获取或设置指示页面是否检查来自浏览器的客户端输入是否具有潜在危险值的值。Gets or sets a value that indicates whether the page checks client input from the browser for potentially dangerous values.

Validators Validators Validators Validators

获取请求的页上包含的全部验证控件的集合。Gets a collection of all validation controls contained on the requested page.

ViewState ViewState ViewState ViewState

获取状态信息的字典,这些信息使您可以在同一页的多个请求间保存和还原服务器控件的视图状态。Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.

(Inherited from Control)
ViewStateEncryptionMode ViewStateEncryptionMode ViewStateEncryptionMode ViewStateEncryptionMode

获取或设置视图状态的加密模式。Gets or sets the encryption mode of the view state.

ViewStateIgnoresCase ViewStateIgnoresCase ViewStateIgnoresCase ViewStateIgnoresCase

获取一个值,该值指示 StateBag 对象是否不区分大小写。Gets a value that indicates whether the StateBag object is case-insensitive.

(Inherited from Control)
ViewStateMode ViewStateMode ViewStateMode ViewStateMode

获取或设置此控件的视图状态模式。Gets or sets the view-state mode of this control.

(Inherited from Control)
ViewStateUserKey ViewStateUserKey ViewStateUserKey ViewStateUserKey

将一个标识符分配给与当前页关联的视图状态变量中的单个用户。Assigns an identifier to an individual user in the view-state variable associated with the current page.

Visible Visible Visible Visible

获取或设置指示是否呈现 Page 对象的值。Gets or sets a value indicating whether the Page object is rendered.

方法

AddContentTemplate(String, ITemplate) AddContentTemplate(String, ITemplate) AddContentTemplate(String, ITemplate) AddContentTemplate(String, ITemplate)

在页初始化过程中调用,用于创建传递给母版页的内容(来自内容控件)的集合,前提是当前页或母版页引用母版页。Called during page initialization to create a collection of content (from content controls) that is handed to a master page, if the current page or master page refers to a master page.

AddedControl(Control, Int32) AddedControl(Control, Int32) AddedControl(Control, Int32) AddedControl(Control, Int32)

在子控件添加到 Control 对象的 Controls 集合后调用。Called after a child control is added to the Controls collection of the Control object.

(Inherited from Control)
AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler) AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler) AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler) AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler)

为异步页注册不需要状态信息的开始和结束事件处理程序委托。Registers beginning and ending event handler delegates that do not require state information for an asynchronous page.

AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler, Object)

为异步页注册开始和结束事件处理程序委托。Registers beginning and ending event handler delegates for an asynchronous page.

AddParsedSubObject(Object) AddParsedSubObject(Object) AddParsedSubObject(Object) AddParsedSubObject(Object)

通知服务器控件,分析了一个元素(XML 或 HTML),并将该元素添加到服务器控件的 ControlCollection 对象中。Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object.

(Inherited from Control)
AddWrappedFileDependencies(Object) AddWrappedFileDependencies(Object) AddWrappedFileDependencies(Object) AddWrappedFileDependencies(Object)

添加组成当前页的依赖文件的列表。Adds a list of dependent files that make up the current page. 此方法由 ASP.NET 页框架在内部使用,不应从代码直接使用。This method is used internally by the ASP.NET page framework and is not intended to be used directly from your code.

ApplyStyleSheetSkin(Page) ApplyStyleSheetSkin(Page) ApplyStyleSheetSkin(Page) ApplyStyleSheetSkin(Page)

将页样式表中定义的样式属性应用到控件。Applies the style properties defined in the page style sheet to the control.

(Inherited from Control)
AspCompatBeginProcessRequest(HttpContext, AsyncCallback, Object) AspCompatBeginProcessRequest(HttpContext, AsyncCallback, Object) AspCompatBeginProcessRequest(HttpContext, AsyncCallback, Object) AspCompatBeginProcessRequest(HttpContext, AsyncCallback, Object)

启动对 Active Server Page (ASP) 资源的请求。Initiates a request for Active Server Page (ASP) resources. 提供此方法是为了与旧式 ASP 应用程序兼容。This method is provided for compatibility with legacy ASP applications.

AspCompatEndProcessRequest(IAsyncResult) AspCompatEndProcessRequest(IAsyncResult) AspCompatEndProcessRequest(IAsyncResult) AspCompatEndProcessRequest(IAsyncResult)

终止对 Active Server Page (ASP) 资源的请求。Terminates a request for Active Server Page (ASP) resources. 提供此方法是为了与旧式 ASP 应用程序兼容。This method is provided for compatibility with legacy ASP applications.

AsyncPageBeginProcessRequest(HttpContext, AsyncCallback, Object) AsyncPageBeginProcessRequest(HttpContext, AsyncCallback, Object) AsyncPageBeginProcessRequest(HttpContext, AsyncCallback, Object) AsyncPageBeginProcessRequest(HttpContext, AsyncCallback, Object)

开始处理异步页请求。Begins processing an asynchronous page request.

AsyncPageEndProcessRequest(IAsyncResult) AsyncPageEndProcessRequest(IAsyncResult) AsyncPageEndProcessRequest(IAsyncResult) AsyncPageEndProcessRequest(IAsyncResult)

结束处理异步页请求。Ends processing an asynchronous page request.

BeginRenderTracing(TextWriter, Object) BeginRenderTracing(TextWriter, Object) BeginRenderTracing(TextWriter, Object) BeginRenderTracing(TextWriter, Object)

开始输出数据的设计时追踪。Begins design-time tracing of rendering data.

(Inherited from Control)
BuildProfileTree(String, Boolean) BuildProfileTree(String, Boolean) BuildProfileTree(String, Boolean) BuildProfileTree(String, Boolean)

收集有关服务器控件的信息并将该信息发送到 Trace 属性,在启用页的跟踪功能时将显示该属性。Gathers information about the server control and delivers it to the Trace property to be displayed when tracing is enabled for the page.

(Inherited from Control)
ClearCachedClientID() ClearCachedClientID() ClearCachedClientID() ClearCachedClientID()

将缓存的 ClientID 值设置为 nullSets the cached ClientID value to null.

(Inherited from Control)
ClearChildControlState() ClearChildControlState() ClearChildControlState() ClearChildControlState()

删除服务器控件的子控件的控件状态信息。Deletes the control-state information for the server control's child controls.

(Inherited from Control)
ClearChildState() ClearChildState() ClearChildState() ClearChildState()

删除服务器控件的所有子控件的视图状态和控件状态信息。Deletes the view-state and control-state information for all the server control's child controls.

(Inherited from Control)
ClearChildViewState() ClearChildViewState() ClearChildViewState() ClearChildViewState()

删除服务器控件的所有子控件的视图状态信息。Deletes the view-state information for all the server control's child controls.

(Inherited from Control)
ClearEffectiveClientIDMode() ClearEffectiveClientIDMode() ClearEffectiveClientIDMode() ClearEffectiveClientIDMode()

将当前控件实例和任何子控件的 ClientIDMode 属性设置为 InheritSets the ClientIDMode property of the current control instance and of any child controls to Inherit.

(Inherited from Control)
Construct() Construct() Construct() Construct()

执行设计时逻辑。Performs design-time logic.

(Inherited from TemplateControl)
CreateChildControls() CreateChildControls() CreateChildControls() CreateChildControls()

由 ASP.NET 页框架调用,以通知服务器控件在准备回发或呈现时使用基于撰写的实现来创建其所包含任何子控件。Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.

(Inherited from Control)
CreateControlCollection() CreateControlCollection() CreateControlCollection() CreateControlCollection()

创建一个新 ControlCollection 对象来保存服务器控件的子控件(包括文本控件和服务器控件)。Creates a new ControlCollection object to hold the child controls (both literal and server) of the server control.

(Inherited from Control)
CreateHtmlTextWriter(TextWriter) CreateHtmlTextWriter(TextWriter) CreateHtmlTextWriter(TextWriter) CreateHtmlTextWriter(TextWriter)

创建 HtmlTextWriter 对象以呈现该页的内容。Creates an HtmlTextWriter object to render the page's content.

CreateHtmlTextWriterFromType(TextWriter, Type) CreateHtmlTextWriterFromType(TextWriter, Type) CreateHtmlTextWriterFromType(TextWriter, Type) CreateHtmlTextWriterFromType(TextWriter, Type)

创建指定的 HtmlTextWriter 对象以呈现该页的内容。Creates a specified HtmlTextWriter object to render the page's content.

CreateResourceBasedLiteralControl(Int32, Int32, Boolean) CreateResourceBasedLiteralControl(Int32, Int32, Boolean) CreateResourceBasedLiteralControl(Int32, Int32, Boolean) CreateResourceBasedLiteralControl(Int32, Int32, Boolean)

访问存储在资源中的字符串。Accesses literal strings stored in a resource. CreateResourceBasedLiteralControl(Int32, Int32, Boolean) 方法并不应从代码中使用。The CreateResourceBasedLiteralControl(Int32, Int32, Boolean) method is not intended for use from within your code.

(Inherited from TemplateControl)
DataBind() DataBind() DataBind() DataBind()

将数据源绑定到调用的服务器控件及其所有子控件。Binds a data source to the invoked server control and all its child controls.

(Inherited from Control)
DataBind(Boolean) DataBind(Boolean) DataBind(Boolean) DataBind(Boolean)

将数据源绑定到调用的服务器控件及其所有子控件,同时可以选择引发 DataBinding 事件。Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event.

(Inherited from Control)
DataBindChildren() DataBindChildren() DataBindChildren() DataBindChildren()

将数据源绑定到服务器控件的子控件。Binds a data source to the server control's child controls.

(Inherited from Control)
DesignerInitialize() DesignerInitialize() DesignerInitialize() DesignerInitialize()

执行 RAD 设计器所需的 Page 类的实例的任何初始化。Performs any initialization of the instance of the Page class that is required by RAD designers. 此方法仅在设计时使用。This method is used only at design time.

DeterminePostBackMode() DeterminePostBackMode() DeterminePostBackMode() DeterminePostBackMode()

返回使用 POST 或 GET 命令回发到页的数据的 NameValueCollectionReturns a NameValueCollection of data posted back to the page using either a POST or a GET command.

DeterminePostBackModeUnvalidated() DeterminePostBackModeUnvalidated() DeterminePostBackModeUnvalidated() DeterminePostBackModeUnvalidated()

返回使用 POST 或 GET 命令发送到该页的名称/值数据集合,而不执行 ASP.NET 在该请求的请求验证。Returns a name-value collection of data that was posted to the page using either a POST or a GET command, without performing ASP.NET request validation on the request.

Dispose() Dispose() Dispose() Dispose()

使服务器控件得以在从内存中释放之前执行最后的清理操作。Enables a server control to perform final clean up before it is released from memory.

(Inherited from Control)
EndRenderTracing(TextWriter, Object) EndRenderTracing(TextWriter, Object) EndRenderTracing(TextWriter, Object) EndRenderTracing(TextWriter, Object)

结束输出数据的设计时追踪。Ends design-time tracing of rendering data.

(Inherited from Control)
EnsureChildControls() EnsureChildControls() EnsureChildControls() EnsureChildControls()

确定服务器控件是否包含子控件。Determines whether the server control contains child controls. 如果不包含,则创建子控件。If it does not, it creates child controls.

(Inherited from Control)
EnsureID() EnsureID() EnsureID() EnsureID()

为尚未分配标识符的控件创建标识符。Creates an identifier for controls that do not have an identifier assigned.

(Inherited from Control)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Eval(String) Eval(String) Eval(String) Eval(String)

计算数据绑定表达式。Evaluates a data-binding expression.

(Inherited from TemplateControl)
Eval(String, String) Eval(String, String) Eval(String, String) Eval(String, String)

使用用于显示结果的指定格式字符串计算数据绑定表达式。Evaluates a data-binding expression using the specified format string to display the result.

(Inherited from TemplateControl)
ExecuteRegisteredAsyncTasks() ExecuteRegisteredAsyncTasks() ExecuteRegisteredAsyncTasks() ExecuteRegisteredAsyncTasks()

开始执行异步任务。Starts the execution of an asynchronous task.

FindControl(String) FindControl(String) FindControl(String) FindControl(String)

在页命名容器中搜索带指定标识符的服务器控件。Searches the page naming container for a server control with the specified identifier.

FindControl(String, Int32) FindControl(String, Int32) FindControl(String, Int32) FindControl(String, Int32)

使用指定的 idpathOffset 参数(该参数有助于搜索)中指定的整数在当前命名容器中搜索服务器控件。Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. 不应重写此版本的 FindControl 方法。You should not override this version of the FindControl method.

(Inherited from Control)
Focus() Focus() Focus() Focus()

为控件设置输入焦点。Sets input focus to a control.

(Inherited from Control)
FrameworkInitialize() FrameworkInitialize() FrameworkInitialize() FrameworkInitialize()

在页生成过程中根据页的声明性特性初始化控件树。Initializes the control tree during page generation based on the declarative nature of the page.

GetDataItem() GetDataItem() GetDataItem() GetDataItem()

获取位于数据绑定上下文堆栈顶部的数据项。Gets the data item at the top of the data-binding context stack.

GetDesignModeState() GetDesignModeState() GetDesignModeState() GetDesignModeState()

获取控件的设计时数据。Gets design-time data for a control.

(Inherited from Control)
GetGlobalResourceObject(String, String) GetGlobalResourceObject(String, String) GetGlobalResourceObject(String, String) GetGlobalResourceObject(String, String)

根据指定的 ClassKeyResourceKey 属性,获取应用程序级别资源对象。Gets an application-level resource object based on the specified ClassKey and ResourceKey properties.

(Inherited from TemplateControl)
GetGlobalResourceObject(String, String, Type, String) GetGlobalResourceObject(String, String, Type, String) GetGlobalResourceObject(String, String, Type, String) GetGlobalResourceObject(String, String, Type, String)

根据资源的指定 ClassKeyResourceKey 属性、对象类型和属性名称获取应用程序级别的资源对象。Gets an application-level resource object based on the specified ClassKey and ResourceKey properties, object type, and property name of the resource.

(Inherited from TemplateControl)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetLocalResourceObject(String) GetLocalResourceObject(String) GetLocalResourceObject(String) GetLocalResourceObject(String)

根据指定的 ResourceKey 属性获取页级别的资源对象。Gets a page-level resource object based on the specified ResourceKey property.

(Inherited from TemplateControl)
GetLocalResourceObject(String, Type, String) GetLocalResourceObject(String, Type, String) GetLocalResourceObject(String, Type, String) GetLocalResourceObject(String, Type, String)

根据指定的 ResourceKey 属性、对象类型和属性名称获取页级别的资源对象。Gets a page-level resource object based on the specified ResourceKey property, object type, and property name.

(Inherited from TemplateControl)
GetPostBackClientEvent(Control, String) GetPostBackClientEvent(Control, String) GetPostBackClientEvent(Control, String) GetPostBackClientEvent(Control, String)

获取可在客户端事件中使用的引用,以将指定控件和指定事件参数发回给服务器。Gets a reference that can be used in a client event to post back to the server for the specified control and with the specified event arguments.

GetPostBackClientHyperlink(Control, String) GetPostBackClientHyperlink(Control, String) GetPostBackClientHyperlink(Control, String) GetPostBackClientHyperlink(Control, String)

获取一个引用,并在其开头附加 javascript:,可以在客户端事件中使用该引用,并将该引用与指定的事件参数一起使用,以便回发到指定控件的服务器。Gets a reference, with javascript: appended to the beginning of it, that can be used in a client event to post back to the server for the specified control and with the specified event arguments.

GetPostBackEventReference(Control) GetPostBackEventReference(Control) GetPostBackEventReference(Control) GetPostBackEventReference(Control)

返回一个可以在客户端事件中使用的字符串,以便回发到服务器。Returns a string that can be used in a client event to cause postback to the server. 由指定的 Control 对象定义的字符串。The reference string is defined by the specified Control object.

GetPostBackEventReference(Control, String) GetPostBackEventReference(Control, String) GetPostBackEventReference(Control, String) GetPostBackEventReference(Control, String)

返回一个可以在客户端事件中使用的字符串,以便回发到服务器。Returns a string that can be used in a client event to cause postback to the server. 该引用字符串由处理回发的指定控件和一个附加事件信息的字符串参数定义。The reference string is defined by the specified control that handles the postback and a string argument of additional event information.

GetRouteUrl(Object) GetRouteUrl(Object) GetRouteUrl(Object) GetRouteUrl(Object)

获取与一组路由参数对应的 URL。Gets the URL that corresponds to a set of route parameters.

(Inherited from Control)
GetRouteUrl(RouteValueDictionary) GetRouteUrl(RouteValueDictionary) GetRouteUrl(RouteValueDictionary) GetRouteUrl(RouteValueDictionary)

获取与一组路由参数对应的 URL。Gets the URL that corresponds to a set of route parameters.

(Inherited from Control)
GetRouteUrl(String, Object) GetRouteUrl(String, Object) GetRouteUrl(String, Object) GetRouteUrl(String, Object)

获取与一组路由参数以及某个路由名称对应的 URL。Gets the URL that corresponds to a set of route parameters and a route name.

(Inherited from Control)
GetRouteUrl(String, RouteValueDictionary) GetRouteUrl(String, RouteValueDictionary) GetRouteUrl(String, RouteValueDictionary) GetRouteUrl(String, RouteValueDictionary)

获取与一组路由参数以及某个路由名称对应的 URL。Gets the URL that corresponds to a set of route parameters and a route name.

(Inherited from Control)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
GetTypeHashCode() GetTypeHashCode() GetTypeHashCode() GetTypeHashCode()

检索由运行时生成的 Page 对象生成的哈希代码。Retrieves a hash code that is generated by Page objects that are generated at run time. 这种哈希代码对于 Page 对象的控件层次结构是唯一的。This hash code is unique to the Page object's control hierarchy.

GetUniqueIDRelativeTo(Control) GetUniqueIDRelativeTo(Control) GetUniqueIDRelativeTo(Control) GetUniqueIDRelativeTo(Control)

返回指定控件的 UniqueID 属性的前缀部分。Returns the prefixed portion of the UniqueID property of the specified control.

(Inherited from Control)
GetValidators(String) GetValidators(String) GetValidators(String) GetValidators(String)

返回指定验证组的控件验证程序的集合。Returns a collection of control validators for a specified validation group.

GetWrappedFileDependencies(String[]) GetWrappedFileDependencies(String[]) GetWrappedFileDependencies(String[]) GetWrappedFileDependencies(String[])

返回与虚拟文件位置列表对应的物理文件名列表。Returns a list of physical file names that correspond to a list of virtual file locations.

HasControls() HasControls() HasControls() HasControls()

确定服务器控件是否包含任何子控件。Determines if the server control contains any child controls.

(Inherited from Control)
HasEvents() HasEvents() HasEvents() HasEvents()

返回一个值,该值指示是否为控件或任何子控件注册事件。Returns a value indicating whether events are registered for the control or any child controls.

(Inherited from Control)
InitializeCulture() InitializeCulture() InitializeCulture() InitializeCulture()

为页的当前线程设置 CultureUICultureSets the Culture and UICulture for the current thread of the page.

InitOutputCache(Int32, String, String, OutputCacheLocation, String) InitOutputCache(Int32, String, String, OutputCacheLocation, String) InitOutputCache(Int32, String, String, OutputCacheLocation, String) InitOutputCache(Int32, String, String, OutputCacheLocation, String)

初始化当前页面请求的输出缓存。Initializes the output cache for the current page request.

InitOutputCache(Int32, String, String, String, OutputCacheLocation, String) InitOutputCache(Int32, String, String, String, OutputCacheLocation, String) InitOutputCache(Int32, String, String, String, OutputCacheLocation, String) InitOutputCache(Int32, String, String, String, OutputCacheLocation, String)

初始化当前页面请求的输出缓存。Initializes the output cache for the current page request.

InitOutputCache(OutputCacheParameters) InitOutputCache(OutputCacheParameters) InitOutputCache(OutputCacheParameters) InitOutputCache(OutputCacheParameters)

根据 OutputCacheParameters 对象初始化当前页请求的输出缓存。Initializes the output cache for the current page request based on an OutputCacheParameters object.

IsClientScriptBlockRegistered(String) IsClientScriptBlockRegistered(String) IsClientScriptBlockRegistered(String) IsClientScriptBlockRegistered(String)

确定具有指定关键字的客户端脚本块是否已向页注册。Determines whether the client script block with the specified key is registered with the page.

IsLiteralContent() IsLiteralContent() IsLiteralContent() IsLiteralContent()

确定服务器控件是否只包含文字内容。Determines if the server control holds only literal content.

(Inherited from Control)
IsStartupScriptRegistered(String) IsStartupScriptRegistered(String) IsStartupScriptRegistered(String) IsStartupScriptRegistered(String)

确定 Page 对象是否注册了客户端启动脚本。Determines whether the client startup script is registered with the Page object.

LoadControl(String) LoadControl(String) LoadControl(String) LoadControl(String)

根据指定的虚拟路径从文件加载 Control 对象。Loads a Control object from a file based on a specified virtual path.

(Inherited from TemplateControl)
LoadControl(Type, Object[]) LoadControl(Type, Object[]) LoadControl(Type, Object[]) LoadControl(Type, Object[])

根据指定类型和构造函数参数加载 Control 对象。Loads a Control object based on a specified type and constructor parameters.

(Inherited from TemplateControl)
LoadControlState(Object) LoadControlState(Object) LoadControlState(Object) LoadControlState(Object)

SaveControlState() 方法保存的上一个页请求还原控件状态信息。Restores control-state information from a previous page request that was saved by the SaveControlState() method.

(Inherited from Control)
LoadPageStateFromPersistenceMedium() LoadPageStateFromPersistenceMedium() LoadPageStateFromPersistenceMedium() LoadPageStateFromPersistenceMedium()

将任何保存的视图状态信息加载到 Page 对象。Loads any saved view-state information to the Page object.

LoadTemplate(String) LoadTemplate(String) LoadTemplate(String) LoadTemplate(String)

从外部文件获取 ITemplate 接口的实例。Obtains an instance of the ITemplate interface from an external file.

(Inherited from TemplateControl)
LoadViewState(Object) LoadViewState(Object) LoadViewState(Object) LoadViewState(Object)

从用 SaveViewState() 方法保存的上一个页面请求还原视图状态信息。Restores view-state information from a previous page request that was saved by the SaveViewState() method.

(Inherited from Control)
MapPath(String) MapPath(String) MapPath(String) MapPath(String)

检索虚拟路径(绝对的或相对的)或应用程序相关的路径映射到的物理路径。Retrieves the physical path that a virtual path, either absolute or relative, or an application-relative path maps to.

MapPathSecure(String) MapPathSecure(String) MapPathSecure(String) MapPathSecure(String)

检索虚拟路径(绝对的或相对的)映射到的物理路径。Retrieves the physical path that a virtual path, either absolute or relative, maps to.

(Inherited from Control)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
OnAbortTransaction(EventArgs) OnAbortTransaction(EventArgs) OnAbortTransaction(EventArgs) OnAbortTransaction(EventArgs)

引发 AbortTransaction 事件。Raises the AbortTransaction event.

(Inherited from TemplateControl)
OnBubbleEvent(Object, EventArgs) OnBubbleEvent(Object, EventArgs) OnBubbleEvent(Object, EventArgs) OnBubbleEvent(Object, EventArgs)

确定服务器控件的事件是否沿页的 UI 服务器控件层次结构向上传递。Determines whether the event for the server control is passed up the page's UI server control hierarchy.

(Inherited from Control)
OnCommitTransaction(EventArgs) OnCommitTransaction(EventArgs) OnCommitTransaction(EventArgs) OnCommitTransaction(EventArgs)

引发 CommitTransaction 事件。Raises the CommitTransaction event.

(Inherited from TemplateControl)
OnDataBinding(EventArgs) OnDataBinding(EventArgs) OnDataBinding(EventArgs) OnDataBinding(EventArgs)

引发 DataBinding 事件。Raises the DataBinding event.

(Inherited from Control)
OnError(EventArgs) OnError(EventArgs) OnError(EventArgs) OnError(EventArgs)

引发 Error 事件。Raises the Error event.

(Inherited from TemplateControl)
OnInit(EventArgs) OnInit(EventArgs) OnInit(EventArgs) OnInit(EventArgs)

引发 Init 事件以对页进行初始化。Raises the Init event to initialize the page.

OnInitComplete(EventArgs) OnInitComplete(EventArgs) OnInitComplete(EventArgs) OnInitComplete(EventArgs)

在页初始化后引发 InitComplete 事件。Raises the InitComplete event after page initialization.

OnLoad(EventArgs) OnLoad(EventArgs) OnLoad(EventArgs) OnLoad(EventArgs)

引发 Load 事件。Raises the Load event.

(Inherited from Control)
OnLoadComplete(EventArgs) OnLoadComplete(EventArgs) OnLoadComplete(EventArgs) OnLoadComplete(EventArgs)

在页加载阶段结束时引发 LoadComplete 事件。Raises the LoadComplete event at the end of the page load stage.

OnPreInit(EventArgs) OnPreInit(EventArgs) OnPreInit(EventArgs) OnPreInit(EventArgs)

在页初始化开始时引发 PreInit 事件。Raises the PreInit event at the beginning of page initialization.

OnPreLoad(EventArgs) OnPreLoad(EventArgs) OnPreLoad(EventArgs) OnPreLoad(EventArgs)

在回发数据已加载到页服务器控件之后但在 PreLoad 事件之前,引发 OnLoad(EventArgs) 事件。Raises the PreLoad event after postback data is loaded into the page server controls but before the OnLoad(EventArgs) event.

OnPreRender(EventArgs) OnPreRender(EventArgs) OnPreRender(EventArgs) OnPreRender(EventArgs)

引发 PreRender 事件。Raises the PreRender event.

(Inherited from Control)
OnPreRenderComplete(EventArgs) OnPreRenderComplete(EventArgs) OnPreRenderComplete(EventArgs) OnPreRenderComplete(EventArgs)

PreRenderComplete 事件之后但在呈现页之前引发 OnPreRenderComplete(EventArgs) 事件。Raises the PreRenderComplete event after the OnPreRenderComplete(EventArgs) event and before the page is rendered.

OnSaveStateComplete(EventArgs) OnSaveStateComplete(EventArgs) OnSaveStateComplete(EventArgs) OnSaveStateComplete(EventArgs)

在已将页状态保存到持久性介质中之后引发 SaveStateComplete 事件。Raises the SaveStateComplete event after the page state has been saved to the persistence medium.

OnUnload(EventArgs) OnUnload(EventArgs) OnUnload(EventArgs) OnUnload(EventArgs)

引发 Unload 事件。Raises the Unload event.

(Inherited from Control)
OpenFile(String) OpenFile(String) OpenFile(String) OpenFile(String)

获取用于读取文件的 StreamGets a Stream used to read a file.

(Inherited from Control)
ParseControl(String) ParseControl(String) ParseControl(String) ParseControl(String)

将输入字符串分析为 Web 窗体页或用户控件上的 Control 对象。Parses an input string into a Control object on the Web Forms page or user control.

(Inherited from TemplateControl)
ParseControl(String, Boolean) ParseControl(String, Boolean) ParseControl(String, Boolean) ParseControl(String, Boolean)

将输入字符串分析为 ASP.NET 网页或用户控件上的 Control 对象。Parses an input string into a Control object on the ASP.NET Web page or user control.

(Inherited from TemplateControl)
ProcessRequest(HttpContext) ProcessRequest(HttpContext) ProcessRequest(HttpContext) ProcessRequest(HttpContext)

设置 Page 对象的内部服务器对象,如 ContextRequestResponseApplication 属性。Sets the intrinsic server objects of the Page object, such as the Context, Request, Response, and Application properties.

RaiseBubbleEvent(Object, EventArgs) RaiseBubbleEvent(Object, EventArgs) RaiseBubbleEvent(Object, EventArgs) RaiseBubbleEvent(Object, EventArgs)

将所有事件源及其信息分配给控件的父级。Assigns any sources of the event and its information to the control's parent.

(Inherited from Control)
RaisePostBackEvent(IPostBackEventHandler, String) RaisePostBackEvent(IPostBackEventHandler, String) RaisePostBackEvent(IPostBackEventHandler, String) RaisePostBackEvent(IPostBackEventHandler, String)

通知引起回发的服务器控件:它应处理传入的回发事件。Notifies the server control that caused the postback that it should handle an incoming postback event.

ReadStringResource() ReadStringResource() ReadStringResource() ReadStringResource()

读取字符串资源。Reads a string resource. ReadStringResource() 方法并不应从代码中使用。The ReadStringResource() method is not intended for use from within your code.

(Inherited from TemplateControl)
RegisterArrayDeclaration(String, String) RegisterArrayDeclaration(String, String) RegisterArrayDeclaration(String, String) RegisterArrayDeclaration(String, String)

声明一个值,该值在页呈现时声明为 ECMAScript 数组声明。Declares a value that is declared as an ECMAScript array declaration when the page is rendered.

RegisterAsyncTask(PageAsyncTask) RegisterAsyncTask(PageAsyncTask) RegisterAsyncTask(PageAsyncTask) RegisterAsyncTask(PageAsyncTask)

向页注册新的异步任务。Registers a new asynchronous task with the page.

RegisterClientScriptBlock(String, String) RegisterClientScriptBlock(String, String) RegisterClientScriptBlock(String, String) RegisterClientScriptBlock(String, String)

向响应发出客户端脚本块。Emits client-side script blocks to the response.

RegisterHiddenField(String, String) RegisterHiddenField(String, String) RegisterHiddenField(String, String) RegisterHiddenField(String, String)

使服务器控件能够在窗体上自动注册隐藏字段。Allows server controls to automatically register a hidden field on the form. 呈现 Page 服务器控件时,将该字段发送到 HtmlForm 对象。The field will be sent to the Page object when the HtmlForm server control is rendered.

RegisterOnSubmitStatement(String, String) RegisterOnSubmitStatement(String, String) RegisterOnSubmitStatement(String, String) RegisterOnSubmitStatement(String, String)

使页能够访问客户端 OnSubmit 事件。Allows a page to access the client OnSubmit event. 脚本应该是注册在其他地方的对客户端代码的函数调用。The script should be a function call to client code registered elsewhere.

RegisterRequiresControlState(Control) RegisterRequiresControlState(Control) RegisterRequiresControlState(Control) RegisterRequiresControlState(Control)

将控件注册为具有持久性控件状态的控件。Registers a control as one whose control state must be persisted.

RegisterRequiresPostBack(Control) RegisterRequiresPostBack(Control) RegisterRequiresPostBack(Control) RegisterRequiresPostBack(Control)

将控件注册为要求在页回发至服务器时进行回发处理的控件。Registers a control as one that requires postback handling when the page is posted back to the server.

RegisterRequiresRaiseEvent(IPostBackEventHandler) RegisterRequiresRaiseEvent(IPostBackEventHandler) RegisterRequiresRaiseEvent(IPostBackEventHandler) RegisterRequiresRaiseEvent(IPostBackEventHandler)

将 ASP.NET 服务器控件注册为需要在 Page 对象上处理控件时引发事件的控件。Registers an ASP.NET server control as one requiring an event to be raised when the control is processed on the Page object.

RegisterRequiresViewStateEncryption() RegisterRequiresViewStateEncryption() RegisterRequiresViewStateEncryption() RegisterRequiresViewStateEncryption()

向页将控件注册为需要视图状态加密的控件。Registers a control with the page as one requiring view-state encryption.

RegisterStartupScript(String, String) RegisterStartupScript(String, String) RegisterStartupScript(String, String) RegisterStartupScript(String, String)

在页响应中发出客户端脚本块。Emits a client-side script block in the page response.

RegisterViewStateHandler() RegisterViewStateHandler() RegisterViewStateHandler() RegisterViewStateHandler()

如果调用,则保持页视图状态。Causes page view state to be persisted, if called.

RemovedControl(Control) RemovedControl(Control) RemovedControl(Control) RemovedControl(Control)

Control 对象的 Controls 集合移除子控件后调用。Called after a child control is removed from the Controls collection of the Control object.

(Inherited from Control)
Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter)

初始化 HtmlTextWriter 对象并调用 Page 的子控件进行呈现。Initializes the HtmlTextWriter object and calls on the child controls of the Page to render.

RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter)

将服务器控件子级的内容输出到提供的 HtmlTextWriter 对象,此对象编写将在客户端呈现的内容。Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client.

(Inherited from Control)
RenderControl(HtmlTextWriter) RenderControl(HtmlTextWriter) RenderControl(HtmlTextWriter) RenderControl(HtmlTextWriter)

将服务器控件内容输出到所提供的 HtmlTextWriter 对象,如果启用了跟踪,则还将存储有关该控件的跟踪信息。Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.

(Inherited from Control)
RenderControl(HtmlTextWriter, ControlAdapter) RenderControl(HtmlTextWriter, ControlAdapter) RenderControl(HtmlTextWriter, ControlAdapter) RenderControl(HtmlTextWriter, ControlAdapter)

使用提供的 HtmlTextWriter 对象将服务器控件内容输出到提供的 ControlAdapter 对象。Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object.

(Inherited from Control)
RequiresControlState(Control) RequiresControlState(Control) RequiresControlState(Control) RequiresControlState(Control)

确定是否注册指定的 Control 对象以参与控件状态管理。Determines whether the specified Control object is registered to participate in control state management.

ResolveAdapter() ResolveAdapter() ResolveAdapter() ResolveAdapter()

获取负责呈现指定控件的控件适配器。Gets the control adapter responsible for rendering the specified control.

(Inherited from Control)
ResolveClientUrl(String) ResolveClientUrl(String) ResolveClientUrl(String) ResolveClientUrl(String)

获取浏览器可以使用的 URL。Gets a URL that can be used by the browser.

(Inherited from Control)
ResolveUrl(String) ResolveUrl(String) ResolveUrl(String) ResolveUrl(String)

将 URL 转换为在请求客户端可用的 URL。Converts a URL into one that is usable on the requesting client.

(Inherited from Control)
SaveControlState() SaveControlState() SaveControlState() SaveControlState()

保存将页面回发到服务器之后发生的所有服务器控件状态更改。Saves any server control state changes that have occurred since the time the page was posted back to the server.

(Inherited from Control)
SavePageStateToPersistenceMedium(Object) SavePageStateToPersistenceMedium(Object) SavePageStateToPersistenceMedium(Object) SavePageStateToPersistenceMedium(Object)

保存页的所有视图状态信息和控件状态信息。Saves any view-state and control-state information for the page.

SaveViewState() SaveViewState() SaveViewState() SaveViewState()

保存将页面回发到服务器之后发生的所有服务器控件视图状态更改。Saves any server control view-state changes that have occurred since the time the page was posted back to the server.

(Inherited from Control)
SetDesignModeState(IDictionary) SetDesignModeState(IDictionary) SetDesignModeState(IDictionary) SetDesignModeState(IDictionary)

为控件设置设计时数据。Sets design-time data for a control.

(Inherited from Control)
SetFocus(Control) SetFocus(Control) SetFocus(Control) SetFocus(Control)

将浏览器焦点设置为指定控件。Sets the browser focus to the specified control.

SetFocus(String) SetFocus(String) SetFocus(String) SetFocus(String)

将浏览器焦点设置为具有指定标识符的控件。Sets the browser focus to the control with the specified identifier.

SetRenderMethodDelegate(RenderMethod) SetRenderMethodDelegate(RenderMethod) SetRenderMethodDelegate(RenderMethod) SetRenderMethodDelegate(RenderMethod)

分配事件处理程序委托,以将服务器控件及其内容呈现到父控件中。Assigns an event handler delegate to render the server control and its content into its parent control.

(Inherited from Control)
SetStringResourcePointer(Object, Int32) SetStringResourcePointer(Object, Int32) SetStringResourcePointer(Object, Int32) SetStringResourcePointer(Object, Int32)

设置指向字符串资源的指针。Sets a pointer to a string resource. SetStringResourcePointer(Object, Int32) 方法是由生成的类使用的,并且不应从代码中使用。The SetStringResourcePointer(Object, Int32) method is used by generated classes and is not intended for use from within your code.

(Inherited from TemplateControl)
SetTraceData(Object, Object) SetTraceData(Object, Object) SetTraceData(Object, Object) SetTraceData(Object, Object)

使用跟踪数据键和跟踪数据值,为呈现数据的设计时追踪设置跟踪数据。Sets trace data for design-time tracing of rendering data, using the trace data key and the trace data value.

(Inherited from Control)
SetTraceData(Object, Object, Object) SetTraceData(Object, Object, Object) SetTraceData(Object, Object, Object) SetTraceData(Object, Object, Object)

使用跟踪对象、跟踪数据键和跟踪数据值,为呈现数据的设计时追踪设置跟踪数据。Sets trace data for design-time tracing of rendering data, using the traced object, the trace data key, and the trace data value.

(Inherited from Control)
TestDeviceFilter(String) TestDeviceFilter(String) TestDeviceFilter(String) TestDeviceFilter(String)

返回一个布尔值,该值指示是否对该 HTTP 请求应用设备筛选器。Returns a Boolean value indicating whether a device filter applies to the HTTP request.

(Inherited from TemplateControl)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
TrackViewState() TrackViewState() TrackViewState() TrackViewState()

导致跟踪服务器控件的视图状态的更改,以便这些更改可以存储到服务器控件的 StateBag 对象中。Causes tracking of view-state changes to the server control so they can be stored in the server control's StateBag object. 通过 ViewState 属性可访问此对象。This object is accessible through the ViewState property.

(Inherited from Control)
TryUpdateModel<TModel>(TModel) TryUpdateModel<TModel>(TModel) TryUpdateModel<TModel>(TModel) TryUpdateModel<TModel>(TModel)

使用来自数据绑定控制的值更新指定的模型实例。Updates the specified model instance using values from the data-bound control.

TryUpdateModel<TModel>(TModel, IValueProvider) TryUpdateModel<TModel>(TModel, IValueProvider) TryUpdateModel<TModel>(TModel, IValueProvider) TryUpdateModel<TModel>(TModel, IValueProvider)

使用来自指定值提供程序的值更新模型实例。Updates the model instance using values from the specified value provider.

UnregisterRequiresControlState(Control) UnregisterRequiresControlState(Control) UnregisterRequiresControlState(Control) UnregisterRequiresControlState(Control)

停止指定控件的控件状态的持久性。Stops persistence of control state for the specified control.

UpdateModel<TModel>(TModel) UpdateModel<TModel>(TModel) UpdateModel<TModel>(TModel) UpdateModel<TModel>(TModel)

使用来自数据绑定控制的值更新指定的模型实例。Updates the specified model instance using values from the data-bound control.

UpdateModel<TModel>(TModel, IValueProvider) UpdateModel<TModel>(TModel, IValueProvider) UpdateModel<TModel>(TModel, IValueProvider) UpdateModel<TModel>(TModel, IValueProvider)

使用来自指定值提供程序的值更新指定的模型实例。Updates the specified model instance using values from a specified value provider.

Validate() Validate() Validate() Validate()

指示该页上包含的所有验证控件验证指派给它们的信息。Instructs any validation controls included on the page to validate their assigned information.

Validate(String) Validate(String) Validate(String) Validate(String)

指示指定验证组中的验证控件验证指派给它们的信息。Instructs the validation controls in the specified validation group to validate their assigned information.

VerifyRenderingInServerForm(Control) VerifyRenderingInServerForm(Control) VerifyRenderingInServerForm(Control) VerifyRenderingInServerForm(Control)

确认在运行时为指定的 ASP.NET 服务器控件呈现 HtmlForm 控件。Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time.

WriteUTF8ResourceString(HtmlTextWriter, Int32, Int32, Boolean) WriteUTF8ResourceString(HtmlTextWriter, Int32, Int32, Boolean) WriteUTF8ResourceString(HtmlTextWriter, Int32, Int32, Boolean) WriteUTF8ResourceString(HtmlTextWriter, Int32, Int32, Boolean)

HtmlTextWriter 控件写入资源字符串。Writes a resource string to an HtmlTextWriter control. WriteUTF8ResourceString(HtmlTextWriter, Int32, Int32, Boolean) 方法是由生成的类使用的,并且不应从代码中使用。The WriteUTF8ResourceString(HtmlTextWriter, Int32, Int32, Boolean) method is used by generated classes and is not intended for use from within your code.

(Inherited from TemplateControl)
XPath(String) XPath(String) XPath(String) XPath(String)

计算 XPath 数据绑定表达式。Evaluates an XPath data-binding expression.

(Inherited from TemplateControl)
XPath(String, IXmlNamespaceResolver) XPath(String, IXmlNamespaceResolver) XPath(String, IXmlNamespaceResolver) XPath(String, IXmlNamespaceResolver)

使用指定的前缀和命名空间映射来计算 XPath 数据绑定表达式,以进行命名空间解析。Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution.

(Inherited from TemplateControl)
XPath(String, String) XPath(String, String) XPath(String, String) XPath(String, String)

计算 XPath 数据绑定表达式,使用指定的格式字符串来显示结果。Evaluates an XPath data-binding expression using the specified format string to display the result.

(Inherited from TemplateControl)
XPath(String, String, IXmlNamespaceResolver) XPath(String, String, IXmlNamespaceResolver) XPath(String, String, IXmlNamespaceResolver) XPath(String, String, IXmlNamespaceResolver)

使用用于命名空间解析的指定前缀和命名空间映射以及用于显示结果的指定格式字符串来计算 XPath 数据绑定表达式。Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution and the specified format string to display the result.

(Inherited from TemplateControl)
XPathSelect(String) XPathSelect(String) XPathSelect(String) XPathSelect(String)

计算 XPath 数据绑定表达式,并返回实现 IEnumerable 接口的节点集合。Evaluates an XPath data-binding expression and returns a node collection that implements the IEnumerable interface.

(Inherited from TemplateControl)
XPathSelect(String, IXmlNamespaceResolver) XPathSelect(String, IXmlNamespaceResolver) XPathSelect(String, IXmlNamespaceResolver) XPathSelect(String, IXmlNamespaceResolver)

使用用于命名空间解析的指定前缀和命名空间映射计算 XPath 数据绑定表达式,并返回实现 IEnumerable 接口的节点集合。Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution and returns a node collection that implements the IEnumerable interface.

(Inherited from TemplateControl)

事件

AbortTransaction AbortTransaction AbortTransaction AbortTransaction

当用户结束交易时发生。Occurs when a user ends a transaction.

(Inherited from TemplateControl)
CommitTransaction CommitTransaction CommitTransaction CommitTransaction

当事务完成时发生。Occurs when a transaction completes.

(Inherited from TemplateControl)
DataBinding DataBinding DataBinding DataBinding

当服务器控件绑定到数据源时发生。Occurs when the server control binds to a data source.

(Inherited from Control)
Disposed Disposed Disposed Disposed

当从内存释放服务器控件时发生,这是请求 ASP.NET 页时服务器控件生存期的最后阶段。Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.

(Inherited from Control)
Error Error Error Error

当引发未经处理的异常时发生。Occurs when an unhandled exception is thrown.

(Inherited from TemplateControl)
Init Init Init Init

当服务器控件初始化时发生;初始化是控件生存期的第一步。Occurs when the server control is initialized, which is the first step in its lifecycle.

(Inherited from Control)
InitComplete InitComplete InitComplete InitComplete

在页初始化完成时发生。Occurs when page initialization is complete.

Load Load Load Load

当服务器控件加载到 Page 对象中时发生。Occurs when the server control is loaded into the Page object.

(Inherited from Control)
LoadComplete LoadComplete LoadComplete LoadComplete

在页生命周期的加载阶段结束时发生。Occurs at the end of the load stage of the page's life cycle.

PreInit PreInit PreInit PreInit

在页初始化之前发生。Occurs before page initialization.

PreLoad PreLoad PreLoad PreLoad

在页 Load 事件之前发生。Occurs before the page Load event.

PreRender PreRender PreRender PreRender

在加载 Control 对象之后、呈现之前发生。Occurs after the Control object is loaded but prior to rendering.

(Inherited from Control)
PreRenderComplete PreRenderComplete PreRenderComplete PreRenderComplete

在呈现页内容之前发生。Occurs before the page content is rendered.

SaveStateComplete SaveStateComplete SaveStateComplete SaveStateComplete

在页已完成对页和页上控件的所有视图状态和控件状态信息的保存后发生。Occurs after the page has completed saving all view state and control state information for the page and controls on the page.

Unload Unload Unload Unload

当服务器控件从内存中卸载时发生。Occurs when the server control is unloaded from memory.

(Inherited from Control)

显式界面实现

IControlDesignerAccessor.GetDesignModeState() IControlDesignerAccessor.GetDesignModeState() IControlDesignerAccessor.GetDesignModeState() IControlDesignerAccessor.GetDesignModeState()

有关此成员的说明,请参见 GetDesignModeState()For a description of this member, see GetDesignModeState().

(Inherited from Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary) IControlDesignerAccessor.SetDesignModeState(IDictionary) IControlDesignerAccessor.SetDesignModeState(IDictionary) IControlDesignerAccessor.SetDesignModeState(IDictionary)

有关此成员的说明,请参见 SetDesignModeState(IDictionary)For a description of this member, see SetDesignModeState(IDictionary).

(Inherited from Control)
IControlDesignerAccessor.SetOwnerControl(Control) IControlDesignerAccessor.SetOwnerControl(Control) IControlDesignerAccessor.SetOwnerControl(Control) IControlDesignerAccessor.SetOwnerControl(Control)

有关此成员的说明,请参阅 SetOwnerControl(Control)For a description of this member, see SetOwnerControl(Control).

(Inherited from Control)
IFilterResolutionService.CompareFilters(String, String) IFilterResolutionService.CompareFilters(String, String) IFilterResolutionService.CompareFilters(String, String) IFilterResolutionService.CompareFilters(String, String)

返回一个值,该值指示在两个指定设备筛选器之间是否存在父/子关系。Returns a value that indicates whether a parent/child relationship exists between two specified device filters.

(Inherited from TemplateControl)
IFilterResolutionService.EvaluateFilter(String) IFilterResolutionService.EvaluateFilter(String) IFilterResolutionService.EvaluateFilter(String) IFilterResolutionService.EvaluateFilter(String)

返回一个值,该值指示指定的筛选器是否为当前筛选器对象的其中一个类型。Returns a value that indicates whether the specified filter is a type of the current filter object.

(Inherited from TemplateControl)
IParserAccessor.AddParsedSubObject(Object) IParserAccessor.AddParsedSubObject(Object) IParserAccessor.AddParsedSubObject(Object) IParserAccessor.AddParsedSubObject(Object)

有关此成员的说明,请参见 AddParsedSubObject(Object)For a description of this member, see AddParsedSubObject(Object).

(Inherited from Control)

Extension Methods

FindDataSourceControl(Control) FindDataSourceControl(Control) FindDataSourceControl(Control) FindDataSourceControl(Control)

返回与指定控件的数据控件关联的数据源。Returns the data source that is associated with the data control for the specified control.

FindFieldTemplate(Control, String) FindFieldTemplate(Control, String) FindFieldTemplate(Control, String) FindFieldTemplate(Control, String)

返回指定控件的命名容器中指定列的字段模板。Returns the field template for the specified column in the specified control's naming container.

FindMetaTable(Control) FindMetaTable(Control) FindMetaTable(Control) FindMetaTable(Control)

返回包含数据控件的元表对象。Returns the metatable object for the containing data control.

GetDefaultValues(INamingContainer) GetDefaultValues(INamingContainer) GetDefaultValues(INamingContainer) GetDefaultValues(INamingContainer)

为指定数据控件获取默认值的集合。Gets the collection of the default values for the specified data control.

GetMetaTable(INamingContainer) GetMetaTable(INamingContainer) GetMetaTable(INamingContainer) GetMetaTable(INamingContainer)

为指定数据控件获取表元数据。Gets the table metadata for the specified data control.

SetMetaTable(INamingContainer, MetaTable) SetMetaTable(INamingContainer, MetaTable) SetMetaTable(INamingContainer, MetaTable) SetMetaTable(INamingContainer, MetaTable)

为指定数据控件设置表元数据。Sets the table metadata for the specified data control.

SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>)

为指定数据控件设置表元数据和默认值映射。Sets the table metadata and default value mapping for the specified data control.

SetMetaTable(INamingContainer, MetaTable, Object) SetMetaTable(INamingContainer, MetaTable, Object) SetMetaTable(INamingContainer, MetaTable, Object) SetMetaTable(INamingContainer, MetaTable, Object)

为指定数据控件设置表元数据和默认值映射。Sets the table metadata and default value mapping for the specified data control.

TryGetMetaTable(INamingContainer, MetaTable) TryGetMetaTable(INamingContainer, MetaTable) TryGetMetaTable(INamingContainer, MetaTable) TryGetMetaTable(INamingContainer, MetaTable)

确定表元数据是否可用。Determines whether table metadata is available.

EnableDynamicData(INamingContainer, Type) EnableDynamicData(INamingContainer, Type) EnableDynamicData(INamingContainer, Type) EnableDynamicData(INamingContainer, Type)

为指定数据控件启用动态数据行为。Enables Dynamic Data behavior for the specified data control.

EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>)

为指定数据控件启用动态数据行为。Enables Dynamic Data behavior for the specified data control.

EnableDynamicData(INamingContainer, Type, Object) EnableDynamicData(INamingContainer, Type, Object) EnableDynamicData(INamingContainer, Type, Object) EnableDynamicData(INamingContainer, Type, Object)

为指定数据控件启用动态数据行为。Enables Dynamic Data behavior for the specified data control.

适用于

另请参阅