DataBoundControl.MarkAsDataBound メソッド
アセンブリ: System.Web (system.web.dll 内)



MarkAsDataBound メソッドを派生データ バインド コントロール クラスで使用する方法を次のコード例に示します。GetData メソッドでデータを取得し、PerformDataBinding メソッドでコントロールにバインドすると、RequiresDataBinding プロパティが false に設定され、MarkAsDataBound メソッドが呼び出されます。このメソッドにより、コントロールがバインドを完了したため、現在のページの有効期間中はバインドが不要になったことが通知されます。このコード例は、DataBoundControl クラスのトピックで取り上げているコード例の一部分です。
Protected Overrides Sub PerformSelect() ' Call OnDataBinding here if bound to a data source using the ' DataSource property (instead of a DataSourceID) because the ' data-binding statement is evaluated before the call to GetData. If Not IsBoundUsingDataSourceID Then OnDataBinding(EventArgs.Empty) End If ' The GetData method retrieves the DataSourceView object from the ' IDataSource associated with the data-bound control. GetData().Select(CreateDataSourceSelectArguments(), _ AddressOf OnDataSourceViewSelectCallback) ' The PerformDataBinding method has completed. RequiresDataBinding = False MarkAsDataBound() ' Raise the DataBound event. OnDataBound(EventArgs.Empty) End Sub 'PerformSelect
protected override void PerformSelect() { // Call OnDataBinding here if bound to a data source using the // DataSource property (instead of a DataSourceID), because the // databinding statement is evaluated before the call to GetData. if (! IsBoundUsingDataSourceID) { OnDataBinding(EventArgs.Empty); } // The GetData method retrieves the DataSourceView object from // the IDataSource associated with the data-bound control. GetData().Select(CreateDataSourceSelectArguments(), OnDataSourceViewSelectCallback); // The PerformDataBinding method has completed. RequiresDataBinding = false; MarkAsDataBound(); // Raise the DataBound event. OnDataBound(EventArgs.Empty); }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataBoundControl.MarkAsDataBound メソッドを検索する場合は、下記のリンクをクリックしてください。

- DataBoundControl.MarkAsDataBound メソッドのページへのリンク