SqlDataSourceSelectingEventArgsとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SqlDataSourceSelectingEventArgsの意味・解説 

SqlDataSourceSelectingEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

SqlDataSource コントロールの Selecting イベントのデータを提供します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Class SqlDataSourceSelectingEventArgs
    Inherits SqlDataSourceCommandEventArgs
Dim instance As SqlDataSourceSelectingEventArgs
public class SqlDataSourceSelectingEventArgs
 : SqlDataSourceCommandEventArgs
public ref class SqlDataSourceSelectingEventArgs
 : public SqlDataSourceCommandEventArgs
public class SqlDataSourceSelectingEventArgs
 extends SqlDataSourceCommandEventArgs
public class SqlDataSourceSelectingEventArgs
 extends SqlDataSourceCommandEventArgs
解説解説

イベント ハンドラ デリゲートを追加して、Selecting イベントを処理することにより、別途プリプロセスを実行したり、データベース クエリそのものをキャンセルしたりできます。SqlDataSourceSelectingEventArgs クラスは SqlDataSourceCommandEventArgs クラスから派生しているため、Cancel プロパティを true に設定することによって、保留中の SqlDataSource データベース クエリをキャンセルできます。Command プロパティが公開している DbCommand オブジェクトにアクセスすることで、クエリを実行する前に、CommandText、Parameters コレクション、および、その他のデータベース クエリ プロパティをチェックし、必要に応じてプロパティを操作できます。また、Arguments プロパティにアクセスすることで、Select メソッドに渡される DataSourceSelectArguments オブジェクトをチェックすることもできます。

SqlDataSourceSelectingEventArgs クラスを、OnSelecting メソッドで使用することにより、SqlDataSource のデータベース クエリに実行前にアクセスできます。

SqlDataSource コントロールは、データ操作の過程で、基になるデータ オブジェクトを操作する際に利用できる、数多くのイベントを公開しています。イベント、および関連する EventArgs クラスとイベント ハンドラのデリゲートの一覧を次の表に示します。

イベント

イベント引数

イベント ハンドラ

Selecting

データが取得される前に発生します。

SqlDataSourceSelectingEventArgs

SqlDataSourceSelectingEventHandler

Inserting、Updating、および Deleting

挿入、更新、削除のいずれかの操作が実行される前に発生します。

SqlDataSourceCommandEventArgs

SqlDataSourceCommandEventHandler

Selected、Inserted、Updated、および Deleted

データの取得、挿入、更新、削除の各操作が完了した後で発生します。

SqlDataSourceStatusEventArgs

SqlDataSourceStatusEventHandler

.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.EventArgs
     System.ComponentModel.CancelEventArgs
       System.Web.UI.WebControls.SqlDataSourceCommandEventArgs
        System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlDataSourceSelectingEventArgs メンバ
System.Web.UI.WebControls 名前空間
SqlDataSourceSelectingEventHandler
SqlDataSourceCommandEventArgs クラス
SqlDataSource.Selecting イベント

SqlDataSourceSelectingEventArgs コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

指定された DbCommand オブジェクト、および、Select メソッドに渡された DataSourceSelectArguments を使用して、SqlDataSourceSelectingEventArgs クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    command As DbCommand, _
    arguments As DataSourceSelectArguments _
)
Dim command As DbCommand
Dim arguments As DataSourceSelectArguments

Dim instance As New SqlDataSourceSelectingEventArgs(command,
 arguments)
public SqlDataSourceSelectingEventArgs (
    DbCommand command,
    DataSourceSelectArguments arguments
)
public:
SqlDataSourceSelectingEventArgs (
    DbCommand^ command, 
    DataSourceSelectArguments^ arguments
)
public SqlDataSourceSelectingEventArgs (
    DbCommand command, 
    DataSourceSelectArguments arguments
)
public function SqlDataSourceSelectingEventArgs
 (
    command : DbCommand, 
    arguments : DataSourceSelectArguments
)

パラメータ

command

キャンセル可能な Select クエリを表す DbCommand オブジェクト。

arguments

Select メソッドに渡す DataSourceSelectArguments オブジェクト。

解説解説

inputParameters パラメータには、名前/値ペアの IDictionary コレクションを指定します。これらの名前/値ペアはメソッド シグネチャに適合している必要があります。またこれらは参照で渡されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlDataSourceSelectingEventArgs クラス
SqlDataSourceSelectingEventArgs メンバ
System.Web.UI.WebControls 名前空間
Select
SqlDataSourceSelectingEventHandler

SqlDataSourceSelectingEventArgs プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Arguments Select メソッドに渡された DataSourceSelectArguments オブジェクトを取得します。
パブリック プロパティ Cancel  イベントをキャンセルするかどうかを示す値を取得または設定します。 ( CancelEventArgs から継承されます。)
パブリック プロパティ Command  保留中のデータベース コマンドを取得します。 ( SqlDataSourceCommandEventArgs から継承されます。)
参照参照

関連項目

SqlDataSourceSelectingEventArgs クラス
System.Web.UI.WebControls 名前空間
SqlDataSourceSelectingEventHandler
SqlDataSourceCommandEventArgs クラス
SqlDataSource.Selecting イベント

SqlDataSourceSelectingEventArgs メソッド


SqlDataSourceSelectingEventArgs メンバ

SqlDataSource コントロールの Selecting イベントのデータを提供します。

SqlDataSourceSelectingEventArgs データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SqlDataSourceSelectingEventArgs 指定された DbCommand オブジェクト、および、Select メソッドに渡された DataSourceSelectArguments を使用して、SqlDataSourceSelectingEventArgs クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Arguments Select メソッドに渡された DataSourceSelectArguments オブジェクトを取得します。
パブリック プロパティ Cancel  イベントをキャンセルするかどうかを示す値を取得または設定します。(CancelEventArgs から継承されます。)
パブリック プロパティ Command  保留中のデータベース コマンドを取得します。(SqlDataSourceCommandEventArgs から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlDataSourceSelectingEventArgs クラス
System.Web.UI.WebControls 名前空間
SqlDataSourceSelectingEventHandler
SqlDataSourceCommandEventArgs クラス
SqlDataSource.Selecting イベント



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「SqlDataSourceSelectingEventArgs」の関連用語

SqlDataSourceSelectingEventArgsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlDataSourceSelectingEventArgsのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS