ObjectDataSource クラス

定義

多階層 Web アプリケーション アーキテクチャで、データ バインド コントロールにデータを提供するビジネス オブジェクトを表します。

public ref class ObjectDataSource : System::Web::UI::DataSourceControl
[System.Drawing.ToolboxBitmap(typeof(System.Web.UI.WebControls.ObjectDataSource))]
public class ObjectDataSource : System.Web.UI.DataSourceControl
[<System.Drawing.ToolboxBitmap(typeof(System.Web.UI.WebControls.ObjectDataSource))>]
type ObjectDataSource = class
    inherit DataSourceControl
Public Class ObjectDataSource
Inherits DataSourceControl
継承
ObjectDataSource
属性

このセクションでは、 ObjectDataSource .aspx ページの in マークアップを示し、それが使用するビジネス オブジェクトを示します。 例は 、.aspx ページです。 これには、コントロールに GridView バインド ObjectDataSource されたコントロールが含まれています。 コントロール マークアップは ObjectDataSource 、ビジネス オブジェクトの名前と、データを取得するために呼び出すビジネス オブジェクト メソッドの名前を指定します。

<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.CS" Assembly="Samples.AspNet.CS" %>
<%@ Page language="c#" %>
<!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>
    <title>ObjectDataSource - C# Example</title>
  </head>
  <body>
    <form id="Form1" method="post" runat="server">

        <asp:gridview
          id="GridView1"
          runat="server"
          datasourceid="ObjectDataSource1" />

        <asp:objectdatasource
          id="ObjectDataSource1"
          runat="server"
          selectmethod="GetAllEmployees"
          typename="Samples.AspNet.CS.EmployeeLogic" />

    </form>
  </body>
</html>
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.VB" Assembly="Samples.AspNet.VB" %>
<%@ Page language="vb" %>
<!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>
    <title>ObjectDataSource - Visual Basic Example</title>
  </head>
  <body>
    <form id="Form1" method="post" runat="server">

        <asp:gridview
          id="GridView1"
          runat="server"
          datasourceid="ObjectDataSource1" />

        <asp:objectdatasource
          id="ObjectDataSource1"
          runat="server"
          selectmethod="GetAllEmployees"
          typename="Samples.AspNet.VB.EmployeeLogic" />

    </form>
  </body>
</html>

次の例は、.aspx ページのコントロールが ObjectDataSource 使用するビジネス オブジェクトを示しています。 (他 ObjectDataSource の多くのコード例でも、このビジネス オブジェクトを使用しています)。この例は、次の 2 つの基本クラスで構成されています。

  • クラスは EmployeeLogic 、 が使用する ObjectDataSource ビジネス ロジック クラスです。

  • クラスは NorthwindEmployee 、 クラスの メソッドによって GetAllEmployees 返されるデータ オブジェクトを EmployeeLogic 定義します。

便宜上、追加 NorthwindDataException のクラスが提供されます。

この一連のサンプル クラスは、Microsoft SQL Server および Microsoft Access で使用できる Northwind Traders データベースで動作します。 完全な動作例については、提供されている .aspx ページの例でこれらのクラスをコンパイルして使用する必要があります。

namespace Samples.AspNet.CS {

using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
  //
  // EmployeeLogic is a stateless business object that encapsulates
  // the operations one can perform on a NorthwindEmployee object.
  //
  public class EmployeeLogic {

    // Returns a collection of NorthwindEmployee objects.
    public static ICollection GetAllEmployees () {
      ArrayList al = new ArrayList();

      ConnectionStringSettings cts = ConfigurationManager.ConnectionStrings["NorthwindConnection"];

      SqlDataSource sds
        = new SqlDataSource(cts.ConnectionString, "SELECT EmployeeID FROM Employees");

      try {

        IEnumerable IDs = sds.Select(DataSourceSelectArguments.Empty);

        // Iterate through the Enumeration and create a
        // NorthwindEmployee object for each ID.
        foreach (DataRowView row in IDs) {
          string id = row["EmployeeID"].ToString();
          NorthwindEmployee nwe = new NorthwindEmployee(id);
          // Add the NorthwindEmployee object to the collection.
          al.Add(nwe);
        }
      }
      finally {
        // If anything strange happens, clean up.
        sds.Dispose();
      }

      return al;
    }
    public static NorthwindEmployee GetEmployee(object anID) {
      return new NorthwindEmployee(anID);
    }

    public static void UpdateEmployeeInfo(NorthwindEmployee ne) {
      bool retval = ne.Save();
      if (! retval) { throw new NorthwindDataException("UpdateEmployee failed."); }
    }

    public static void DeleteEmployee(NorthwindEmployee ne) { }
  }

  public class NorthwindEmployee {

    public NorthwindEmployee () {
      ID = DBNull.Value;
      lastName = "";
      firstName = "";
      title="";
      titleOfCourtesy = "";
      reportsTo = -1;
    }

    public NorthwindEmployee (object anID) {
      this.ID = anID;

      ConnectionStringSettings cts = ConfigurationManager.ConnectionStrings["NorthwindConnection"];

        SqlConnection conn = new SqlConnection (cts.ConnectionString);
      SqlCommand sc =
        new SqlCommand(" SELECT FirstName,LastName,Title,TitleOfCourtesy,ReportsTo " +
                       " FROM Employees " +
                       " WHERE EmployeeID = @empId",
                       conn);
      // Add the employee ID parameter and set its value.
      sc.Parameters.Add(new SqlParameter("@empId",SqlDbType.Int)).Value = Int32.Parse(anID.ToString());
      SqlDataReader sdr = null;

      try {
        conn.Open();
        sdr = sc.ExecuteReader();

        // This is not a while loop. It only loops once.
        if (sdr != null && sdr.Read()) {
          // The IEnumerable contains DataRowView objects.
          this.firstName        = sdr["FirstName"].ToString();
          this.lastName         = sdr["LastName"].ToString();
          this.title            = sdr["Title"].ToString();
          this.titleOfCourtesy  = sdr["TitleOfCourtesy"].ToString();
          if (! sdr.IsDBNull(4)) {
            this.reportsTo        = sdr.GetInt32(4);
          }
        }
        else {
          throw new NorthwindDataException("Data not loaded for employee id.");
        }
      }
      finally {
        try {
          if (sdr != null) sdr.Close();
          conn.Close();
        }
        catch (SqlException) {
          // Log an event in the Application Event Log.
          throw;
        }
      }
    }

    private object ID;

    private string lastName;
    public string LastName {
      get { return lastName; }
      set { lastName = value; }
    }

    private string firstName;
    public string FirstName {
      get { return firstName; }
      set { firstName = value;  }
    }

    private string title;
    public String Title {
      get { return title; }
      set { title = value; }
    }

    private string titleOfCourtesy;
    public string Courtesy {
      get { return titleOfCourtesy; }
      set { titleOfCourtesy = value; }
    }

    private int    reportsTo;
    public int Supervisor {
      get { return reportsTo; }
      set { reportsTo = value; }
    }

    public bool Save () {
      return true;
    }
  }

  internal class NorthwindDataException: Exception {
    public NorthwindDataException(string msg) : base (msg) { }
  }
}
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.UI
Imports System.Web.UI.WebControls

Namespace Samples.AspNet.VB
'
' EmployeeLogic is a stateless business object that encapsulates
' the operations you can perform on a NorthwindEmployee object.
' When the class is written in Visual Basic, you cannot use the Shared
' part.
Public Class EmployeeLogic
   ' Returns a collection of NorthwindEmployee objects.
   Public Shared Function GetAllEmployees() As ICollection
      Dim al As New ArrayList()

      Dim cts As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("NorthwindConnection")
      Dim sds As New SqlDataSource(cts.ConnectionString, "SELECT EmployeeID FROM Employees")
      Try
         Dim IDs As IEnumerable = sds.Select(DataSourceSelectArguments.Empty)

         ' Iterate through the Enumeration and create a
         ' NorthwindEmployee object for each ID.
         For Each row As DataRowView In IDs
            Dim id As String = row("EmployeeID").ToString()
            Dim nwe As New NorthwindEmployee(id)
            ' Add the NorthwindEmployee object to the collection.
            al.Add(nwe)
         Next
      Finally
         ' If anything strange happens, clean up.
         sds.Dispose()
      End Try

      Return al
   End Function 'GetAllEmployees

   Public Shared Function GetEmployee(anID As Object) As NorthwindEmployee
      Return New NorthwindEmployee(anID)
   End Function 'GetEmployee


   Public Shared Sub UpdateEmployeeInfo(ne As NorthwindEmployee)
      Dim retval As Boolean = ne.Save()
      If Not retval Then
         Throw New NorthwindDataException("UpdateEmployee failed.")
      End If
   End Sub

   Public Shared Sub DeleteEmployee(ne As NorthwindEmployee)
   End Sub

End Class


Public Class NorthwindEmployee


   Public Sub New()
      ID = DBNull.Value
      aLastName = ""
      aFirstName = ""
      aTitle = ""
      titleOfCourtesy = ""
      reportsTo = - 1
   End Sub


   Public Sub New(anID As Object)
      Me.ID = anID
      Dim cts As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("NorthwindConnection")
      Dim conn As New SqlConnection(cts.ConnectionString)
      Dim sc As New SqlCommand(" SELECT FirstName,LastName,Title,TitleOfCourtesy,ReportsTo " & _
                               " FROM Employees " & _
                               " WHERE EmployeeID = @empId", conn)
      ' Add the employee ID parameter and set its value.
      sc.Parameters.Add(New SqlParameter("@empId", SqlDbType.Int)).Value = Int32.Parse(anID.ToString())
      Dim sdr As SqlDataReader = Nothing

      Try
         conn.Open()
         sdr = sc.ExecuteReader()

         ' This is not a while loop. It only loops once.
         If Not (sdr Is Nothing) AndAlso sdr.Read() Then
            ' The IEnumerable contains DataRowView objects.
            Me.aFirstName = sdr("FirstName").ToString()
            Me.aLastName = sdr("LastName").ToString()
            Me.aTitle = sdr("Title").ToString()
            Me.titleOfCourtesy = sdr("TitleOfCourtesy").ToString()
            If Not sdr.IsDBNull(4) Then
               Me.reportsTo = sdr.GetInt32(4)
            End If
         Else
            Throw New NorthwindDataException("Data not loaded for employee id.")
         End If
      Finally
         Try
            If Not (sdr Is Nothing) Then
               sdr.Close()
            End If
            conn.Close()
         Catch se As SqlException
            ' Log an event in the Application Event Log.
            Throw
         End Try
      End Try
   End Sub

   Private ID As Object

   Private aLastName As String
   Public Property LastName() As String
      Get
         Return aLastName
      End Get
      Set
         aLastName = value
      End Set
   End Property

   Private aFirstName As String
   Public Property FirstName() As String
      Get
         Return aFirstName
      End Get
      Set
         aFirstName = value
      End Set
   End Property

   Private aTitle As String
   Public Property Title() As String
      Get
         Return aTitle
      End Get
      Set
         aTitle = value
      End Set
   End Property

   Private titleOfCourtesy As String
   Public Property Courtesy() As String
      Get
         Return titleOfCourtesy
      End Get
      Set
         titleOfCourtesy = value
      End Set
   End Property
   Private reportsTo As Integer

   Public Property Supervisor() As Integer
      Get
         Return reportsTo
      End Get
      Set
         reportsTo = value
      End Set
   End Property

   Public Function Save() As Boolean
      Return True
   End Function 'Save
End Class


Friend Class NorthwindDataException
   Inherits Exception

   Public Sub New(msg As String)
      MyBase.New(msg)
   End Sub
End Class
End Namespace

注釈

このトピックの内容:

はじめに

コントロールは ObjectDataSource 、作成したクラスで動作します。 データを取得および更新するメソッドを作成し、それらのメソッドの名前をマークアップでコントロールに ObjectDataSource 指定します。 レンダリングまたはポストバック処理中に、 は ObjectDataSource 指定したメソッドを呼び出します。

コントロールの ObjectDataSource ビジュアル レンダリングはありません。 その結果、 ObjectDataSource では、 プロパティや SkinID プロパティなどのビジュアル機能はEnableThemingサポートされません。

目的

非常に一般的なアプリケーション設計プラクティスは、プレゼンテーション レイヤーをビジネス ロジックから分離し、ビジネス オブジェクトにビジネス ロジックをカプセル化することです。 これらのビジネス オブジェクトは、プレゼンテーション レイヤーとデータ層の間に個別のレイヤーを形成し、その結果、3 層のアプリケーション アーキテクチャになります。 コントロールを使用すると、開発者は ObjectDataSource 3 層アプリケーション アーキテクチャを維持しながら、ASP.NET データ ソース管理を使用できます。

コントロールは ObjectDataSource リフレクションを使用してビジネス オブジェクトのインスタンスを作成し、そのオブジェクトのメソッドを呼び出してデータの取得、更新、挿入、削除を行います。 プロパティは TypeName 、 が操作するクラスの名前を ObjectDataSource 識別します。 コントロールは ObjectDataSource 、メソッド呼び出しごとに クラスのインスタンスを作成および破棄します。Web 要求の有効期間中、オブジェクトはメモリ内に保持されません。 これは、使用するビジネス オブジェクトに多くのリソースが必要な場合、または作成と破棄にコストがかかる場合に、深刻な考慮事項です。 コストの高いオブジェクトを使用することは最適な設計上の選択ではない場合がありますが、および イベントを使用して、オブジェクトのライフ サイクルをObjectCreatingObjectCreatedObjectDisposing制御できます。

注意

、および DeleteMethod の各プロパティでInsertMethodUpdateMethodSelectMethod識別されるメソッドには、インスタンス メソッドまたは static (Visual Basic では )Shared メソッドを指定できます。 メソッドstaticが (Shared Visual Basic の場合) の場合、ビジネス オブジェクトのインスタンスは作成されず、、ObjectCreatedObjectCreatingおよび ObjectDisposing イベントは発生しません。

データの取得

ビジネス オブジェクトからデータを取得するには、 プロパティを SelectMethod 、データを取得するメソッドの名前に設定します。 メソッドが または DataSet オブジェクトをIEnumerable返さない場合、オブジェクトはコレクション内IEnumerableのランタイムによってラップされます。 メソッド シグネチャにパラメーターがある場合は、オブジェクトをSelectParametersコレクションに追加Parameterし、 プロパティでSelectMethod指定されたメソッドに渡す値にバインドできます。 コントロールでパラメーターを ObjectDataSource 使用するには、パラメーターがメソッド シグネチャ内のパラメーターの名前と型と一致している必要があります。 詳細については、「 ObjectDataSource コントロールでのパラメーターの使用」を参照してください。

コントロールは ObjectDataSource 、メソッドが呼び出されるたびにデータを Select 取得します。 このメソッドは、 プロパティで指定された メソッドへのプログラムによる SelectMethod アクセスを提供します。 プロパティでSelectMethod指定されたメソッドは、メソッドの呼び出し時DataBindに にバインドされるコントロールによって自動的にObjectDataSource呼び出されます。 データ バインド コントロールの プロパティを設定 DataSourceID すると、コントロールは必要に応じてデータ ソースのデータに自動的にバインドされます。 プロパティの DataSourceID 設定は、コントロールをデータ バインド コントロールにバインド ObjectDataSource する場合に推奨される方法です。 または、 プロパティを DataSource 設定することもできますが、データ バインド コントロールの メソッドを DataBind 明示的に呼び出す必要があります。 メソッドは Select 、いつでもプログラムで呼び出してデータを取得できます。

データ バインディング コントロールをデータ ソース コントロールにバインドする方法の詳細については、「データ ソース コントロール を使用したデータへのバインド」を参照してください。

データ操作の実行

コントロールが使用する ObjectDataSource ビジネス オブジェクトの機能に応じて、更新、挿入、削除などのデータ操作を実行できます。 これらのデータ操作を実行するには、適切なメソッド名と、実行する操作に関連付けられているパラメーターを設定します。 たとえば、更新操作の場合、 プロパティを UpdateMethod 更新を実行するビジネス オブジェクト メソッドの名前に設定し、必要なパラメーターをコレクションに UpdateParameters 追加します。 コントロールが ObjectDataSource データ バインド コントロールに関連付けられている場合、パラメーターはデータ バインド コントロールによって追加されます。 この場合、メソッドのパラメーター名がデータ バインド コントロールのフィールド名と一致していることを確認する必要があります。 更新は、 メソッドが呼び出されたときに Update 、コードによって明示的に実行されるか、データ バインド コントロールによって自動的に実行されます。 と Insert の操作に対して同じ一般的なDeleteパターンが続きます。 ビジネス オブジェクトは、バッチ処理ではなく、一度に 1 つのレコードでこれらの種類のデータ操作を実行することを前提としています。

データのフィルター処理

コントロールはObjectDataSource、 または オブジェクトとしてデータが返された場合に、 プロパティによってSelectMethod取得されるデータをDataSetDataTableフィルター処理できます。 プロパティを FilterExpression フィルター式に設定するには、書式指定文字列構文を使用し、式の値をコレクションで指定されたパラメーターに FilterParameters バインドします。

キャッシュ

ObjectDataSourceは複数の要求にわたってビジネス オブジェクトのインスタンスを保持しませんが、 プロパティによって識別されるメソッドを呼び出した結果をSelectMethodキャッシュできます。 データがキャッシュされている間、メソッドの Select 後続の呼び出しでは、ビジネス オブジェクトを作成してリフレクションを使用してを呼び出す代わりに、キャッシュされたデータが SelectMethod 返されます。 キャッシュを使用すると、Web サーバー上のメモリを犠牲にしてオブジェクトを作成し、そのデータ メソッドを呼び出すのを回避できます。 ObjectDataSourceプロパティが にtrueCacheDuration設定され、 プロパティがキャッシュにデータを格納してからキャッシュが破棄されるまでの秒数に設定されるとEnableCaching、 は自動的にデータをキャッシュします。 プロパティと省略可能SqlCacheDependencyCacheExpirationPolicyプロパティを指定することもできます。 ObjectDataSourceコントロールを使用すると、すべての種類のデータをキャッシュできますが、オブジェクトの同じインスタンスが複数の要求の処理に使用されるため、複数の要求 (開いているSqlDataReaderオブジェクトなど) に対して共有できないリソースまたは状態を保持するオブジェクトはキャッシュしないでください。

特徴

次の表では、コントロールの機能について ObjectDataSource 説明します。

説明 必要条件
選択 プロパティを SelectMethod 、データを選択するビジネス オブジェクト メソッドの名前に設定し、プログラムまたはデータ バインド コントロールを SelectParameters 使用してコレクションに必要なパラメーターを含めます。
並べ替え プロパティを SortParameterName 、並べ替え条件を含む メソッドの SelectMethod パラメーターの名前に設定します。
Filtering プロパティを FilterExpression フィルター式に設定し、必要に応じてパラメーターをコレクションに追加して FilterParameters 、メソッドの呼び出し時にデータを Select フィルター処理します。 プロパティでSelectMethod指定されたメソッドは、 または DataTableDataSet返す必要があります。
Paging 取得するレコードの最大数と取得する最初の SelectMethod レコードのインデックスのパラメーターが メソッドに含まれている場合は、データ ソースのページングがサポートされます。 これらのパラメーターの名前は、 プロパティと StartRowIndexParameterName プロパティでMaximumRowsParameterNameそれぞれ設定する必要があります。 データ バインド コントロールは、 プロパティで指定されたメソッドでコントロールが直接ページングをサポートしていない場合でも、ページング自体をSelectMethod実行できる場合ObjectDataSourceがあります。 これを行うことができるデータ バインド コントロールの要件は、 プロパティで SelectMethod 指定されたメソッドが、 インターフェイスを実装するオブジェクトを ICollection 返すということです。
更新中 プロパティを UpdateMethod 、データを更新するビジネス オブジェクト メソッドの名前に設定し、コレクションに必要なパラメーターを UpdateParameters 含めます。
削除中 プロパティを、データを DeleteMethod 削除するビジネス オブジェクト メソッドまたは関数の名前に設定し、コレクションに必要なパラメーターを DeleteParameters 含めます。
挿入 プロパティを InsertMethod 、データを挿入するビジネス オブジェクト メソッドまたは関数の名前に設定し、コレクションに必要なパラメーターを InsertParameters 含めます。
キャッシュ キャッシュされたデータにEnableCachingtrue必要なキャッシュ動作に従って、 プロパティを に設定しCacheDuration、 プロパティと CacheExpirationPolicy プロパティを設定します。

注意

クラスを ObjectDataSource 使用してデータを更新または挿入する場合、クライアントで入力された文字列は、クライアント カルチャ形式からサーバー カルチャ形式に自動的に変換されません。 たとえば、クライアント カルチャでは日付形式として DD/MM/YYYY を指定し、サーバー上の日付形式は MM/DD/YYYY にすることができます。 その場合、2009 年 10 月 5 日は 2009 年 5 月 10 日としてコントロールに入力 TextBox されますが、2009 年 5 月 10 日と解釈されます。 2009 年 10 月 15 日は 2009 年 15 月 10 日と入力され、無効な日付として拒否されます。

データ ビュー

すべてのデータ ソース コントロールと同様に ObjectDataSource 、コントロールはデータ ソース ビュー クラスに関連付けられます。 ObjectDataSourceコントロールは、ページ開発者がデータを操作するために使用するインターフェイスですが、 クラスは、ObjectDataSourceViewデータ バインド コントロールが操作するインターフェイスです。 さらに、 クラスは ObjectDataSourceView データ ソース管理の機能を記述し、実際の作業を実行します。 コントロールには ObjectDataSource 、関連付けられた ObjectDataSourceViewが 1 つだけあり、常に という名前が付けられます DefaultViewObjectDataSourceViewオブジェクトは メソッドによってGetView公開されますが、そのプロパティとメソッドの多くはラップされ、コントロールによってObjectDataSource直接公開されます。 オブジェクトは、 ObjectDataSourceView バックグラウンドで、データの取得、挿入、更新、削除、フィルター処理、並べ替えを含むすべてのデータ操作を実行します。 詳細については、「ObjectDataSourceView」を参照してください。

LINQ to SQLの使用

コントロールは、ObjectDataSourceLINQ to SQL クラスで使用できます。 これを行うには、 プロパティを TypeName データ コンテキスト クラスの名前に設定します。 また、SelectMethodUpdateMethodInsertMethodおよび DeleteMethod の各メソッドを、対応する操作を実行するデータ コンテキスト クラスのメソッドに設定します。 データ コンテキスト クラスの破棄を取り消すには、 ObjectDisposing イベントのイベント ハンドラーを作成する必要があります。 この手順が必要なのは、LINQ to SQLが遅延実行をサポートするのに対ObjectDataSourceし、コントロールは Select 操作の後にデータ コンテキストを破棄するためです。 LINQ to SQL クラスを作成する方法の詳細については、「How to: Create LINQ to SQL Classes in a Web Project」を参照してください。 データ コンテキスト クラスの破棄を取り消す方法の例については、 イベントを ObjectDisposing 参照してください。

Entity Framework の使用

Entity Framework で コントロールを使用 ObjectDataSource することもできます。 詳細については、「 Entity Framework と ObjectDataSource コントロールの使用」を参照してください。

宣言構文

<asp:ObjectDataSource
    CacheDuration="string|Infinite"
    CacheExpirationPolicy="Absolute|Sliding"
    CacheKeyDependency="string"
    ConflictDetection="OverwriteChanges|CompareAllValues"
    ConvertNullToDBNull="True|False"
    DataObjectTypeName="string"
    DeleteMethod="string"
    EnableCaching="True|False"
    EnablePaging="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    FilterExpression="string"
    ID="string"
    InsertMethod="string"
    MaximumRowsParameterName="string"
    OldValuesParameterFormatString="string"
    OnDataBinding="DataBinding event handler"
    OnDeleted="Deleted event handler"
    OnDeleting="Deleting event handler"
    OnDisposed="Disposed event handler"
    OnFiltering="Filtering event handler"
    OnInit="Init event handler"
    OnInserted="Inserted event handler"
    OnInserting="Inserting event handler"
    OnLoad="Load event handler"
    OnObjectCreated="ObjectCreated event handler"
    OnObjectCreating="ObjectCreating event handler"
    OnObjectDisposing="ObjectDisposing event handler"
    OnPreRender="PreRender event handler"
    OnSelected="Selected event handler"
    OnSelecting="Selecting event handler"
    OnUnload="Unload event handler"
    OnUpdated="Updated event handler"
    OnUpdating="Updating event handler"
    runat="server"
    SelectCountMethod="string"
    SelectMethod="string"
    SkinID="string"
    SortParameterName="string"
    SqlCacheDependency="string"
    StartRowIndexParameterName="string"
    TypeName="string"
    UpdateMethod="string"
    Visible="True|False"
>
        <DeleteParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </DeleteParameters>
        <FilterParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </FilterParameters>
        <InsertParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </InsertParameters>
        <SelectParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </SelectParameters>
        <UpdateParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </UpdateParameters>
</asp:ObjectDataSource>

コンストラクター

ObjectDataSource()

ObjectDataSource クラスの新しいインスタンスを初期化します。

ObjectDataSource(String, String)

型名とデータ取得メソッド名を指定して、ObjectDataSource クラスの新しいインスタンスを初期化します。

プロパティ

Adapter

コントロール用のブラウザー固有のアダプターを取得します。

(継承元 Control)
AppRelativeTemplateSourceDirectory

このコントロールが含まれている Page オブジェクトまたは UserControl オブジェクトのアプリケーション相対の仮想ディレクトリを取得または設定します。

(継承元 Control)
BindingContainer

このコントロールのデータ バインディングを格納しているコントロールを取得します。

(継承元 Control)
CacheDuration

SelectMethod プロパティによって取得したデータを、データ ソース コントロールがキャッシュする時間 (秒単位) を取得または設定します。

CacheExpirationPolicy

存続期間と組み合わせた場合の、データ ソース コントロールが使用するキャッシュの動作を記述するキャッシュの有効期限の動作を取得または設定します。

CacheKeyDependency

データ ソース コントロールによって作成されたすべてのデータ キャッシュ オブジェクトにリンクされる、ユーザー定義のキー依存関係を取得または設定します。

ChildControlsCreated

サーバー コントロールの子コントロールが作成されたかどうかを示す値を取得します。

(継承元 Control)
ClientID

ASP.NET によって生成されたサーバー コントロール ID を取得します。

(継承元 DataSourceControl)
ClientIDMode

このプロパティは、データ ソース コントロールでは使用されません。

(継承元 DataSourceControl)
ClientIDSeparator

ClientID プロパティで使用される区切り記号を表す文字値を取得します。

(継承元 Control)
ConflictDetection

Update メソッドに新しい値だけを渡すか、Update メソッドに新旧両方の値を渡すかを決定する値を取得または設定します。

Context

現在の Web 要求に対するサーバー コントロールに関連付けられている HttpContext オブジェクトを取得します。

(継承元 Control)
Controls

UI 階層内の指定されたサーバー コントロールの子コントロールを表す ControlCollection オブジェクトを取得します。

(継承元 DataSourceControl)
ConvertNullToDBNull

更新、挿入、削除の各操作に渡される Parameter 値を、Value コントロールで null から ObjectDataSource 値に自動的に変換するかどうかを示す値を取得または設定します。

DataItemContainer

名前付けコンテナーが IDataItemContainer を実装している場合、名前付けコンテナーへの参照を取得します。

(継承元 Control)
DataKeysContainer

名前付けコンテナーが IDataKeysControl を実装している場合、名前付けコンテナーへの参照を取得します。

(継承元 Control)
DataObjectTypeName

ObjectDataSource コントロールが、データ バインド コントロールから個々の値を渡す代わりに、データの更新、挿入、削除の各操作のパラメーターに使用するクラスの名前を取得または設定します。

DeleteMethod

ObjectDataSource コントロールがデータを削除するために呼び出すメソッドまたは関数の名前を取得または設定します。

DeleteParameters

DeleteMethod メソッドによって使用されるパラメーターを格納するパラメーター コレクションを取得します。

DesignMode

コントロールがデザイン サーフェイスで使用されているかどうかを示す値を取得します。

(継承元 Control)
EnableCaching

ObjectDataSource コントロールでデータ キャッシュが有効かどうかを示す値を取得または設定します。

EnablePaging

データ ソース コントロールが取得したデータ セットを使用するページングをサポートしているかどうかを示す値を取得または設定します。

EnableTheming

このコントロールがテーマをサポートしているかどうかを示す値を取得します。

(継承元 DataSourceControl)
EnableViewState

要求元クライアントに対して、サーバー コントロールがそのビュー状態と、そこに含まれる任意の子のコントロールのビュー状態を保持するかどうかを示す値を取得または設定します。

(継承元 Control)
Events

コントロールのイベント ハンドラー デリゲートのリストを取得します。 このプロパティは読み取り専用です。

(継承元 Control)
FilterExpression

SelectMethod プロパティで指定されたメソッドの呼び出し時に適用されるフィルター式を取得または設定します。

FilterParameters

FilterExpression 文字列のパラメーター プレースホルダーに関連付けられたパラメーターのコレクションを取得します。

HasChildViewState

現在のサーバー コントロールの子コントロールが、保存されたビューステートの設定を持っているかどうかを示す値を取得します。

(継承元 Control)
ID

サーバー コントロールに割り当てられたプログラム ID を取得または設定します。

(継承元 Control)
IdSeparator

コントロール ID を区別するために使用する文字を取得します。

(継承元 Control)
InsertMethod

ObjectDataSource コントロールがデータを挿入するために呼び出すメソッドまたは関数の名前を取得または設定します。

InsertParameters

InsertMethod プロパティによって使用されるパラメーターを格納するパラメーター コレクションを取得します。

IsChildControlStateCleared

このコントロールに含まれているコントロールに、コントロールの状態が設定されているかどうかを示す値を取得します。

(継承元 Control)
IsTrackingViewState

サーバー コントロールがビューステートの変更を保存しているかどうかを示す値を取得します。

(継承元 Control)
IsViewStateEnabled

このコントロールでビューステートが有効かどうかを示す値を取得します。

(継承元 Control)
LoadViewStateByID

コントロールがインデックスではなく ID によりビューステートの読み込みを行うかどうかを示す値を取得します。

(継承元 Control)
MaximumRowsParameterName

データ ソース ページングをサポートするために取得するレコード数を示す際に使用する、ビジネス オブジェクトのデータ取得メソッドのパラメーター名を取得または設定します。

NamingContainer

同じ ID プロパティ値を持つ複数のサーバー コントロールを区別するための一意の名前空間を作成する、サーバー コントロールの名前付けコンテナーへの参照を取得します。

(継承元 Control)
OldValuesParameterFormatString

Delete メソッドまたは Update メソッドに渡される元の値のパラメーター名に適用される書式指定文字列を取得または設定します。

Page

サーバー コントロールを含んでいる Page インスタンスへの参照を取得します。

(継承元 Control)
Parent

ページ コントロールの階層構造における、サーバー コントロールの親コントロールへの参照を取得します。

(継承元 Control)
ParsingCulture

DataObjectTypeName で示される型のオブジェクトを構築するために文字列値を実際のプロパティ型に変換するときに使用するカルチャ情報を示す値を取得または設定します。

RenderingCompatibility

レンダリングされる HTML と互換性がある ASP.NET のバージョンを表す値を取得します。

(継承元 Control)
SelectCountMethod

行数を取得するために ObjectDataSource コントロールが呼び出すメソッドまたは関数の名前を取得または設定します。

SelectMethod

データを取得するために ObjectDataSource コントロールが呼び出すメソッドまたは関数の名前を取得または設定します。

SelectParameters

SelectMethod プロパティで指定されたメソッドにより使用されるパラメーターのコレクションを取得します。

Site

デザイン サーフェイスに現在のコントロールを表示するときに、このコントロールをホストするコンテナーに関する情報を取得します。

(継承元 Control)
SkinID

DataSourceControl コントロールに適用するスキンを取得します。

(継承元 DataSourceControl)
SortParameterName

データ ソースの並べ替えをサポートするために、SelectMethod パラメーターで並べ替え式を指定する際に使用したビジネス オブジェクトの名前を取得また設定します。

SqlCacheDependency

Microsoft SQL Server キャッシュの依存関係で使用するデータベースとテーブルを示す、セミコロンで区切られた文字列を取得または設定します。

StartRowIndexParameterName

データ ソース ページングをサポートするために取得する最初のレコードの識別子の値を示す際に使用する、データ取得メソッドのパラメーター名を取得または設定します。

TemplateControl

このコントロールを格納しているテンプレートへの参照を取得または設定します。

(継承元 Control)
TemplateSourceDirectory

現在のサーバー コントロールを格納している Page または UserControl の仮想ディレクトリを取得します。

(継承元 Control)
TypeName

ObjectDataSource オブジェクトが表すクラスの名前を取得または設定します。

UniqueID

階層構造で修飾されたサーバー コントロールの一意の ID を取得します。

(継承元 Control)
UpdateMethod

ObjectDataSource コントロールがデータを更新するために呼び出すメソッドまたは関数の名前を取得または設定します。

UpdateParameters

UpdateMethod プロパティで指定されたメソッドによって使用されるパラメーターを格納するパラメーター コレクションを取得します。

ValidateRequestMode

ブラウザーからのクライアント入力の安全性をコントロールで調べるかどうかを示す値を取得または設定します。

(継承元 Control)
ViewState

同一のページに対する複数の要求にわたって、サーバー コントロールのビューステートを保存し、復元できるようにする状態情報のディクショナリを取得します。

(継承元 Control)
ViewStateIgnoresCase

StateBag オブジェクトが大文字小文字を区別しないかどうかを示す値を取得します。

(継承元 Control)
ViewStateMode

このコントロールのビューステート モードを取得または設定します。

(継承元 Control)
Visible

コントロールが視覚的に表示されているかどうかを示す値を取得または設定します。

(継承元 DataSourceControl)

メソッド

AddedControl(Control, Int32)

子コントロールが Control オブジェクトの Controls コレクションに追加された後に呼び出されます。

(継承元 Control)
AddParsedSubObject(Object)

XML または HTML のいずれかの要素が解析されたことをサーバー コントロールに通知し、サーバー コントロールの ControlCollection オブジェクトに要素を追加します。

(継承元 Control)
ApplyStyleSheetSkin(Page)

ページのスタイル シートに定義されたスタイル プロパティをコントロールに適用します。

(継承元 DataSourceControl)
BeginRenderTracing(TextWriter, Object)

レンダリング データのデザイン時のトレースを開始します。

(継承元 Control)
BuildProfileTree(String, Boolean)

ページのトレースが有効な場合、サーバー コントロールに関する情報を収集し、これを表示するために Trace プロパティに渡します。

(継承元 Control)
ClearCachedClientID()

キャッシュされた ClientID 値を null に設定します。

(継承元 Control)
ClearChildControlState()

サーバー コントロールのすべての子コントロールについて、コントロールの状態情報を削除します。

(継承元 Control)
ClearChildState()

サーバー コントロールのすべての子コントロールのビューステート情報およびコントロールの状態情報を削除します。

(継承元 Control)
ClearChildViewState()

サーバー コントロールのすべての子コントロールのビューステート情報を削除します。

(継承元 Control)
ClearEffectiveClientIDMode()

現在のコントロール インスタンスおよびすべての子コントロールの ClientIDMode プロパティを Inherit に設定します。

(継承元 Control)
CreateChildControls()

ASP.NET ページ フレームワークによって呼び出され、ポストバックまたはレンダリングの準備として、合成ベースの実装を使うサーバー コントロールに対し、それらのコントロールに含まれる子コントロールを作成するように通知します。

(継承元 Control)
CreateControlCollection()

子コントロールを格納するコレクションを作成します。

(継承元 DataSourceControl)
DataBind()

呼び出されたサーバー コントロールとそのすべての子コントロールにデータ ソースをバインドします。

(継承元 Control)
DataBind(Boolean)

DataBinding イベントを発生させるオプションを指定して、呼び出されたサーバー コントロールとそのすべての子コントロールにデータ ソースをバインドします。

(継承元 Control)
DataBindChildren()

データ ソースをサーバー コントロールの子コントロールにバインドします。

(継承元 Control)
Delete()

DeleteMethod コレクション内のパラメーターを持つ DeleteParameters プロパティで識別されるメソッドを呼び出して削除操作を実行します。

Dispose()

サーバー コントロールが、メモリから解放される前に最終的なクリーンアップを実行できるようにします。

(継承元 Control)
EndRenderTracing(TextWriter, Object)

レンダリング データのデザイン時のトレースを終了します。

(継承元 Control)
EnsureChildControls()

サーバー コントロールに子コントロールが含まれているかどうかを確認します。 含まれていない場合、子コントロールを作成します。

(継承元 Control)
EnsureID()

ID が割り当てられていないコントロールの ID を作成します。

(継承元 Control)
Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
FindControl(String)

指定した id パラメーターを使用して、サーバー コントロールの現在の名前付けコンテナーを検索します。

(継承元 DataSourceControl)
FindControl(String, Int32)

指定した id および検索に役立つ pathOffset パラメーターに指定された整数を使用して、サーバー コントロールの現在の名前付けコンテナーを検索します。 この形式の FindControl メソッドはオーバーライドしないでください。

(継承元 Control)
Focus()

コントロールに入力フォーカスを設定します。

(継承元 DataSourceControl)
GetDesignModeState()

コントロールのデザイン時データを取得します。

(継承元 Control)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetRouteUrl(Object)

ルート パラメーターのセットに対応する URL を取得します。

(継承元 Control)
GetRouteUrl(RouteValueDictionary)

ルート パラメーターのセットに対応する URL を取得します。

(継承元 Control)
GetRouteUrl(String, Object)

ルート パラメーターのセットおよびルート名に対応する URL を取得します。

(継承元 Control)
GetRouteUrl(String, RouteValueDictionary)

ルート パラメーターのセットおよびルート名に対応する URL を取得します。

(継承元 Control)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
GetUniqueIDRelativeTo(Control)

指定されたコントロールの UniqueID プロパティのプレフィックス部分を返します。

(継承元 Control)
GetView(String)

データ ソース コントロールに関連付けられた名前付きデータ ソース ビューを取得します。

GetViewNames()

ObjectDataSource オブジェクトに関連付けられたビュー オブジェクトのリストを表す名前のコレクションを取得します。

HasControls()

サーバー コントロールに子コントロールが含まれているかどうかを確認します。

(継承元 DataSourceControl)
HasEvents()

コントロールまたは子コントロールに対してイベントが登録されているかどうかを示す値を返します。

(継承元 Control)
Insert()

InsertMethod プロパティと InsertParameters コレクション内のパラメーターで識別されるメソッドを呼び出して挿入操作を実行します。

IsLiteralContent()

サーバー コントロールがリテラルな内容だけを保持しているかどうかを決定します。

(継承元 Control)
LoadControlState(Object)

SaveControlState() メソッドによって保存された前回のページ要求からコントロールの状態情報を復元します。

(継承元 Control)
LoadViewState(Object)

以前に保存した ObjectDataSource コントロールのビュー ステートを読み込みます。

MapPathSecure(String)

仮想パス (絶対パスまたは相対パス) の割り当て先の物理パスを取得します。

(継承元 Control)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
OnBubbleEvent(Object, EventArgs)

サーバー コントロールのイベントをページの UI サーバー コントロールの階層構造に渡すかどうかを決定します。

(継承元 Control)
OnDataBinding(EventArgs)

DataBinding イベントを発生させます。

(継承元 Control)
OnInit(EventArgs)

LoadComplete コントロールを格納するページに ObjectDataSource イベント ハンドラーを追加します。

OnLoad(EventArgs)

Load イベントを発生させます。

(継承元 Control)
OnPreRender(EventArgs)

PreRender イベントを発生させます。

(継承元 Control)
OnUnload(EventArgs)

Unload イベントを発生させます。

(継承元 Control)
OpenFile(String)

ファイルの読み込みで使用される Stream を取得します。

(継承元 Control)
RaiseBubbleEvent(Object, EventArgs)

イベントのソースおよびその情報をコントロールの親に割り当てます。

(継承元 Control)
RaiseDataSourceChangedEvent(EventArgs)

DataSourceChanged イベントを発生させます。

(継承元 DataSourceControl)
RemovedControl(Control)

Control オブジェクトの Controls コレクションから子コントロールが削除された後に呼び出されます。

(継承元 Control)
Render(HtmlTextWriter)

提供されたクライアントに表示される内容を書き込む HtmlTextWriter オブジェクトに、サーバー コントロールの内容を送信します。

(継承元 Control)
RenderChildren(HtmlTextWriter)

提供された HtmlTextWriter オブジェクトに対してサーバー コントロールの子のコンテンツを出力すると、クライアントで表示されるコンテンツが記述されます。

(継承元 Control)
RenderControl(HtmlTextWriter)

指定の HtmlTextWriter オブジェクトにサーバー コントロールの内容を出力し、トレースが有効である場合はコントロールに関するトレース情報を保存します。

(継承元 DataSourceControl)
RenderControl(HtmlTextWriter, ControlAdapter)

指定した ControlAdapter オブジェクトを使用して、指定した HtmlTextWriter オブジェクトにサーバー コントロールの内容を出力します。

(継承元 Control)
ResolveAdapter()

指定したコントロールを表示するコントロール アダプターを取得します。

(継承元 Control)
ResolveClientUrl(String)

ブラウザーで使用できる URL を取得します。

(継承元 Control)
ResolveUrl(String)

要求側クライアントで使用できる URL に変換します。

(継承元 Control)
SaveControlState()

ページがサーバーにポスト バックされた時間以降に発生したすべてのサーバー コントロール状態の変化を保存します。

(継承元 Control)
SaveViewState()

ObjectDataSource コントロールの状態を保存します。

Select()

SelectMethod コレクション内のパラメーターを持つ SelectParameters プロパティで識別されるメソッドを呼び出して、基になるデータ ストレージからデータを取得します。

SetDesignModeState(IDictionary)

コントロールのデザイン時データを設定します。

(継承元 Control)
SetRenderMethodDelegate(RenderMethod)

サーバー コントロールとその内容を親コントロールに表示するイベント ハンドラー デリゲートを割り当てます。

(継承元 Control)
SetTraceData(Object, Object)

トレース データ キーとトレース データ値を使用して、レンダリング データのデザイン時トレースのトレース データを設定します。

(継承元 Control)
SetTraceData(Object, Object, Object)

トレースされたオブジェクト、トレース データ キー、およびトレース データ値を使用して、レンダリング データのデザイン時トレースのトレース データを設定します。

(継承元 Control)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
TrackViewState()

ObjectDataSource コントロールのビューステートの変更を追跡し、StateBag オブジェクトに格納できるようにします。

Update()

UpdateMethod プロパティと UpdateParameters コレクション内のパラメーターで識別されるメソッドを呼び出して更新操作を実行します。

イベント

DataBinding

サーバー コントロールがデータ ソースに連結すると発生します。

(継承元 Control)
Deleted

Delete() 操作が完了したときに発生します。

Deleting

Delete() 操作の前に発生します。

Disposed

サーバー コントロールがメモリから解放されると発生します。これは、ASP.NET ページが要求されている場合のサーバー コントロールの有効期間における最終段階です。

(継承元 Control)
Filtering

フィルター操作の前に発生します。

Init

サーバー コントロールが初期化されると発生します。これは、サーバー コントロールの有効期間における最初の手順です。

(継承元 Control)
Inserted

Insert() 操作が完了したときに発生します。

Inserting

Insert() 操作の前に発生します。

Load

サーバー コントロールが Page オブジェクトに読み込まれると発生します。

(継承元 Control)
ObjectCreated

TypeName プロパティで識別されるオブジェクトが作成された後に発生します。

ObjectCreating

TypeName プロパティで識別されるオブジェクトが作成される前に発生します。

ObjectDisposing

TypeName プロパティで識別されるオブジェクトが破棄される前に発生します。

PreRender

Control オブジェクトの読み込み後、表示を開始する前に発生します。

(継承元 Control)
Selected

Select() 操作が完了したときに発生します。

Selecting

Select() 操作の前に発生します。

Unload

サーバー コントロールがメモリからアンロードされると発生します。

(継承元 Control)
Updated

Update() 操作が完了したときに発生します。

Updating

Update() 操作の前に発生します。

明示的なインターフェイスの実装

IControlBuilderAccessor.ControlBuilder

このメンバーの詳細については、「ControlBuilder」をご覧ください。

(継承元 Control)
IControlDesignerAccessor.GetDesignModeState()

このメンバーの詳細については、「GetDesignModeState()」をご覧ください。

(継承元 Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary)

このメンバーの詳細については、「SetDesignModeState(IDictionary)」をご覧ください。

(継承元 Control)
IControlDesignerAccessor.SetOwnerControl(Control)

このメンバーの詳細については、「SetOwnerControl(Control)」をご覧ください。

(継承元 Control)
IControlDesignerAccessor.UserData

このメンバーの詳細については、「UserData」をご覧ください。

(継承元 Control)
IDataBindingsAccessor.DataBindings

このメンバーの詳細については、「DataBindings」をご覧ください。

(継承元 Control)
IDataBindingsAccessor.HasDataBindings

このメンバーの詳細については、「HasDataBindings」をご覧ください。

(継承元 Control)
IDataSource.DataSourceChanged

データ バインド コントロールに影響を与えるようにデータ ソース コントロールが変更されたときに発生します。

(継承元 DataSourceControl)
IDataSource.GetView(String)

DataSourceView コントロールに関連付けられている名前付きの DataSourceControl オブジェクトを取得します。 データ ソース コントロールには、1 つのビューしかサポートしていないものもあれば、複数のビューをサポートするものもあります。

(継承元 DataSourceControl)
IDataSource.GetViewNames()

DataSourceView コントロールに関連付けられた DataSourceControl オブジェクトのリストを表す名前のコレクションを取得します。

(継承元 DataSourceControl)
IExpressionsAccessor.Expressions

このメンバーの詳細については、「Expressions」をご覧ください。

(継承元 Control)
IExpressionsAccessor.HasExpressions

このメンバーの詳細については、「HasExpressions」をご覧ください。

(継承元 Control)
IListSource.ContainsListCollection

データ ソース コントロールが 1 つ以上のデータのリストに関連付けられているかどうかを示します。

(継承元 DataSourceControl)
IListSource.GetList()

データのリストのソースとして使用できるデータ ソース コントロールのリストを取得します。

(継承元 DataSourceControl)
IParserAccessor.AddParsedSubObject(Object)

このメンバーの詳細については、「AddParsedSubObject(Object)」をご覧ください。

(継承元 Control)

拡張メソッド

FindDataSourceControl(Control)

指定されたコントロールのデータ コントロールに関連付けられているデータ ソースを返します。

FindFieldTemplate(Control, String)

指定されたコントロールの名前付けコンテナー内にある、指定された列のフィールド テンプレートを返します。

FindMetaTable(Control)

格納しているデータ コントロールのメタテーブル オブジェクトを返します。

GetDefaultValues(IDataSource)

指定されたデータ ソースの既定値のコレクションを取得します。

GetMetaTable(IDataSource)

指定したデータ ソース オブジェクト内のテーブルのメタデータを取得します。

TryGetMetaTable(IDataSource, MetaTable)

テーブル メタデータが使用できるかどうかを判断します。

適用対象

こちらもご覧ください