HtmlSelect.OnLoad(EventArgs) 方法

定义

Load 控件引发 HtmlSelect 事件。Raises the Load event for the HtmlSelect control.

protected public:
 override void OnLoad(EventArgs ^ e);
protected internal override void OnLoad (EventArgs e);
override this.OnLoad : EventArgs -> unit
Protected Friend Overrides Sub OnLoad (e As EventArgs)

参数

e
EventArgs

包含事件数据的 EventArgsA EventArgs that contains the event data.

例外

未能找到 DataSourceID 属性中指定的 ID。The ID specified in the DataSourceID property cannot be found.

- 或 --or- DataSourceID 属性中指定的控件的类型不是 IDataSourceThe control specified in the DataSourceID property is not of the type IDataSource.

无法解析数据源,因为对 DataSource 属性和 DataSourceID 属性指定了同一个值。The data source cannot be resolved because a value is specified for both the DataSource property and the DataSourceID property.

- 或 --or- 未能找到请求的 DataMember 属性。The requested DataMember property could not be found.

注解

OnLoad方法通知 HtmlSelect 控件应执行与该控件关联的页的每个 HTTP 请求所共有的操作。The OnLoad method notifies the HtmlSelect control that it should perform actions common to each HTTP request for the page it is associated with. OnLoad方法将控件连接 HtmlSelect 到在 DataSource 属性或属性中指定的适当数据源 DataSourceIDThe OnLoad method connects the HtmlSelect control to the appropriate data source specified in either the DataSource property or the DataSourceID property. 如果 DataSourceID 属性要指定 HtmlSelect 控件应用于检索其数据源的数据源控件,则将 OnDataSourceViewChanged 方法设置为事件处理程序。If the DataSourceID property is to specify the data source control that the HtmlSelect control should use to retrieve its data source, then the OnDataSourceViewChanged method is set as the event handler.

适用于

另请参阅