Repeater.RequiresDataBinding 属性
定义
protected:
property bool RequiresDataBinding { bool get(); void set(bool value); };
protected bool RequiresDataBinding { get; set; }
member this.RequiresDataBinding : bool with get, set
Protected Property RequiresDataBinding As Boolean
属性值
如果 Repeater 控件需要绑定到数据源,则为 true;否则为 false。true if the Repeater control needs to bind to a data source; otherwise, false.
注解
Repeater控件使用 RequiresDataBinding 属性来确定控件是否需要调用 DataBind 方法以绑定到其指定的数据源。The Repeater control uses the RequiresDataBinding property to determine whether the control needs to call the DataBind method to bind to its specified data source.
每次在调用方法后,在、或属性上调用 set 访问器 DataSource DataSourceID DataMember 来更改数据源后 OnInit ,ASP.NET 会将属性的值设置 RequiresDataBinding 为 true 。Each time the set accessor is called on either the DataSource, DataSourceID, or DataMember property to change the data source after the OnInit method has already been called, ASP.NET sets the value of the RequiresDataBinding property to true. RequiresDataBinding调用方法时,也将属性的值设置为 true OnDataSourceViewChanged 。The value of the RequiresDataBinding property is also set to true when the OnDataSourceViewChanged method is called.
ASP.NET 在 RequiresDataBinding false 调用方法后立即将属性的值设置为 DataBind 。ASP.NET sets the value of the RequiresDataBinding property to false immediately after the DataBind method is called.