HierarchicalDataSourceControl クラス

定義

階層データを表現するデータ ソース コントロールの基底クラスを提供します。

public ref class HierarchicalDataSourceControl abstract : System::Web::UI::Control, System::Web::UI::IHierarchicalDataSource
[System.ComponentModel.Bindable(false)]
public abstract class HierarchicalDataSourceControl : System.Web.UI.Control, System.Web.UI.IHierarchicalDataSource
[<System.ComponentModel.Bindable(false)>]
type HierarchicalDataSourceControl = class
    inherit Control
    interface IHierarchicalDataSource
Public MustInherit Class HierarchicalDataSourceControl
Inherits Control
Implements IHierarchicalDataSource
継承
HierarchicalDataSourceControl
派生
属性
実装

次のコード例では、抽象HierarchicalDataSourceControlクラスと クラスを拡張し、 インターフェイスと IHierarchyData インターフェイスをHierarchicalDataSourceView実装IHierarchicalEnumerableして、ファイル システム情報を取得する階層データ ソース コントロールを作成する方法を示します。 コントロールを FileSystemDataSource 使用すると、Web サーバー コントロールはオブジェクトにバインドし FileSystemInfo 、基本的なファイル システム情報を表示できます。 この例の クラスは FileSystemDataSource 、 オブジェクトを取得する メソッドの GetHierarchicalView 実装を FileSystemDataSourceView 提供します。 オブジェクトは FileSystemDataSourceView 、基になるデータ ストレージ (この場合は Web サーバー上のファイル システム情報) からデータを取得します。 セキュリティ上の理由から、ファイル システム情報は、データ ソース管理が localhost で認証されたシナリオで使用されている場合にのみ表示され、データ ソース管理を使用するWeb Forms ページが存在する仮想ディレクトリでのみ開始されます。 最後に、 と を実装IHierarchicalEnumerableする 2 つのクラスは、 を使用するオブジェクトFileSystemDataSourceFileSystemInfoラップするために提供IHierarchyDataされます。

using System;
using System.Collections;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public class FileSystemDataSource :
    HierarchicalDataSourceControl, IHierarchicalDataSource
{
    private FileSystemDataSourceView view = null;

    public FileSystemDataSource() : base() { }

    protected override HierarchicalDataSourceView
        GetHierarchicalView(string viewPath)
    {
        view = new FileSystemDataSourceView(viewPath);
        return view;
    }
}
public class FileSystemDataSourceView : HierarchicalDataSourceView
{
    private string _viewPath;

    public FileSystemDataSourceView(string viewPath)
    {
        HttpRequest currentRequest = HttpContext.Current.Request;
        if (viewPath == "")
        {
            _viewPath = currentRequest.MapPath(currentRequest.ApplicationPath);
        }
        else
        {
            _viewPath = Path.Combine(
                currentRequest.MapPath(currentRequest.ApplicationPath),
                viewPath);
        }
    }

    // Starting with the rootNode, recursively build a list of
    // FileSystemInfo nodes, create FileSystemHierarchyData
    // objects, add them all to the FileSystemHierarchicalEnumerable,
    // and return the list.
    public override IHierarchicalEnumerable Select()
    {
        HttpRequest currentRequest = HttpContext.Current.Request;

        // SECURITY: There are many security issues that can be raised
        // SECURITY: by exposing the file system structure of a Web server
        // SECURITY: to an anonymous user in a limited trust scenario such as
        // SECURITY: a Web page served on an intranet or the Internet.
        // SECURITY: For this reason, the FileSystemDataSource only
        // SECURITY: shows data when the HttpRequest is received
        // SECURITY: from a local Web server. In addition, the data source
        // SECURITY: does not display data to anonymous users.
        if (currentRequest.IsAuthenticated &&
            (currentRequest.UserHostAddress == "127.0.0.1" ||
             currentRequest.UserHostAddress == "::1"))
        {
            DirectoryInfo rootDirectory = new DirectoryInfo(_viewPath);
            if (!rootDirectory.Exists)
            {
                return null;
            }

            FileSystemHierarchicalEnumerable fshe =
                new FileSystemHierarchicalEnumerable();

            foreach (FileSystemInfo fsi
                in rootDirectory.GetFileSystemInfos())
            {
                fshe.Add(new FileSystemHierarchyData(fsi));
            }
            return fshe;
        }
        else
        {
            throw new NotSupportedException(
                "The FileSystemDataSource only " +
                "presents data in an authenticated, localhost context.");
        }
    }
}
// A collection of FileSystemHierarchyData objects
public class FileSystemHierarchicalEnumerable :
    ArrayList, IHierarchicalEnumerable
{
    public FileSystemHierarchicalEnumerable()
        : base()
    {
    }

    public IHierarchyData GetHierarchyData(object enumeratedItem)
    {
        return enumeratedItem as IHierarchyData;
    }
}

public class FileSystemHierarchyData : IHierarchyData
{
    private FileSystemInfo fileSystemObject = null;

    public FileSystemHierarchyData(FileSystemInfo obj)
    {
        fileSystemObject = obj;
    }

    public override string ToString()
    {
        return fileSystemObject.Name;
    }
    // IHierarchyData implementation.
    public bool HasChildren
    {
        get
        {
            if (typeof(DirectoryInfo) == fileSystemObject.GetType())
            {
                DirectoryInfo temp = (DirectoryInfo)fileSystemObject;
                return (temp.GetFileSystemInfos().Length > 0);
            }
            else
            {
                return false;
            }
        }
    }
    // DirectoryInfo returns the OriginalPath, while FileInfo returns
    // a fully qualified path.
    public string Path
    {
        get
        {
            return fileSystemObject.ToString();
        }
    }
    public object Item
    {
        get
        {
            return fileSystemObject;
        }
    }
    public string Type
    {
        get
        {
            return "FileSystemData";
        }
    }
    public IHierarchicalEnumerable GetChildren()
    {
        FileSystemHierarchicalEnumerable children =
            new FileSystemHierarchicalEnumerable();

        if (typeof(DirectoryInfo) == fileSystemObject.GetType())
        {
            DirectoryInfo temp = (DirectoryInfo)fileSystemObject;
            foreach (FileSystemInfo fsi in temp.GetFileSystemInfos())
            {
                children.Add(new FileSystemHierarchyData(fsi));
            }
        }
        return children;
    }

    public IHierarchyData GetParent()
    {
        FileSystemHierarchicalEnumerable parentContainer =
            new FileSystemHierarchicalEnumerable();

        if (typeof(DirectoryInfo) == fileSystemObject.GetType())
        {
            DirectoryInfo temp = (DirectoryInfo)fileSystemObject;
            return new FileSystemHierarchyData(temp.Parent);
        }
        else if (typeof(FileInfo) == fileSystemObject.GetType())
        {
            FileInfo temp = (FileInfo)fileSystemObject;
            return new FileSystemHierarchyData(temp.Directory);
        }
        // If FileSystemObj is any other kind of FileSystemInfo, ignore it.
        return null;
    }
}
Imports System.Collections
Imports System.IO
Imports System.Runtime.InteropServices
Imports System.Security.Permissions
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls

Namespace Samples.AspNet

    Public Class FileSystemDataSource
        Inherits HierarchicalDataSourceControl

        Public Sub New()
        End Sub

        Private view As FileSystemDataSourceView = Nothing

        Protected Overrides Function GetHierarchicalView( _
            ByVal viewPath As String) As HierarchicalDataSourceView

            view = New FileSystemDataSourceView(viewPath)
            Return view
        End Function

    End Class
    Public Class FileSystemDataSourceView
        Inherits HierarchicalDataSourceView

        Private _viewPath As String

        Public Sub New(ByVal viewPath As String)
            Dim currentRequest As HttpRequest = HttpContext.Current.Request
            If viewPath = "" Then
                _viewPath = currentRequest.MapPath(currentRequest.ApplicationPath)
            Else
                _viewPath = Path.Combine(currentRequest.MapPath(currentRequest.ApplicationPath), viewPath)
            End If
        End Sub


        ' Starting with the rootNode, recursively build a list of
        ' FileSystemInfo nodes, create FileSystemHierarchyData
        ' objects, add them all to the FileSystemHierarchicalEnumerable,
        ' and return the list.
        Public Overrides Function [Select]() As IHierarchicalEnumerable
            Dim currentRequest As HttpRequest = HttpContext.Current.Request

            ' SECURITY: There are many security issues that can be raised
            ' SECURITY: by exposing the file system structure of a Web server
            ' SECURITY: to an anonymous user in a limited trust scenario such as
            ' SECURITY: a Web page served on an intranet or the Internet.
            ' SECURITY: For this reason, the FileSystemDataSource only
            ' SECURITY: shows data when the HttpRequest is received
            ' SECURITY: from a local Web server. In addition, the data source
            ' SECURITY: does not display data to anonymous users.
            If currentRequest.IsAuthenticated AndAlso _
                (currentRequest.UserHostAddress = "127.0.0.1" OrElse _
                 currentRequest.UserHostAddress = "::1") Then

                Dim rootDirectory As New DirectoryInfo(_viewPath)

                Dim fshe As New FileSystemHierarchicalEnumerable()

                Dim fsi As FileSystemInfo
                For Each fsi In rootDirectory.GetFileSystemInfos()
                    fshe.Add(New FileSystemHierarchyData(fsi))
                Next fsi
                Return fshe
            Else
                Throw New NotSupportedException( _
                    "The FileSystemDataSource only " + _
                    "presents data in an authenticated, localhost context.")
            End If
        End Function 'Select
    End Class

    Public Class FileSystemHierarchicalEnumerable
        Inherits ArrayList
        Implements IHierarchicalEnumerable

        Public Sub New()
        End Sub


        Public Overridable Function GetHierarchyData( _
            ByVal enumeratedItem As Object) As IHierarchyData _
            Implements IHierarchicalEnumerable.GetHierarchyData

            Return CType(enumeratedItem, IHierarchyData)
        End Function

    End Class


    Public Class FileSystemHierarchyData
        Implements IHierarchyData

        Public Sub New(ByVal obj As FileSystemInfo)
            fileSystemObject = obj
        End Sub

        Private fileSystemObject As FileSystemInfo = Nothing

        Public Overrides Function ToString() As String
            Return fileSystemObject.Name
        End Function

        ' IHierarchyData implementation.
        Public Overridable ReadOnly Property HasChildren() As Boolean _
         Implements IHierarchyData.HasChildren
            Get
                If GetType(DirectoryInfo) Is fileSystemObject.GetType() Then
                    Dim temp As DirectoryInfo = _
                        CType(fileSystemObject, DirectoryInfo)
                    Return temp.GetFileSystemInfos().Length > 0
                Else
                    Return False
                End If
            End Get
        End Property
        ' DirectoryInfo returns the OriginalPath, while FileInfo returns
        ' a fully qualified path.

        Public Overridable ReadOnly Property Path() As String _
         Implements IHierarchyData.Path
            Get
                Return fileSystemObject.ToString()
            End Get
        End Property

        Public Overridable ReadOnly Property Item() As Object _
         Implements IHierarchyData.Item
            Get
                Return fileSystemObject
            End Get
        End Property

        Public Overridable ReadOnly Property Type() As String _
         Implements IHierarchyData.Type
            Get
                Return "FileSystemData"
            End Get
        End Property

        Public Overridable Function GetChildren() _
            As IHierarchicalEnumerable _
            Implements IHierarchyData.GetChildren

            Dim children As New FileSystemHierarchicalEnumerable()

            If GetType(DirectoryInfo) Is fileSystemObject.GetType() Then
                Dim temp As DirectoryInfo = _
                    CType(fileSystemObject, DirectoryInfo)
                Dim fsi As FileSystemInfo
                For Each fsi In temp.GetFileSystemInfos()
                    children.Add(New FileSystemHierarchyData(fsi))
                Next fsi
            End If
            Return children
        End Function 'GetChildren


        Public Overridable Function GetParent() As IHierarchyData _
         Implements IHierarchyData.GetParent
            Dim parentContainer As New FileSystemHierarchicalEnumerable()

            If GetType(DirectoryInfo) Is fileSystemObject.GetType() Then
                Dim temp As DirectoryInfo = _
                    CType(fileSystemObject, DirectoryInfo)
                Return New FileSystemHierarchyData(temp.Parent)
            ElseIf GetType(FileInfo) Is fileSystemObject.GetType() Then
                Dim temp As FileInfo = CType(fileSystemObject, FileInfo)
                Return New FileSystemHierarchyData(temp.Directory)
            End If
            ' If FileSystemObj is any other kind of FileSystemInfo, ignore it.
            Return Nothing
        End Function 'GetParent
    End Class
End Namespace

次のコード例では、この例を使用して、コントロールを TreeView ファイル システム データに宣言的にバインドする方法を FileSystemDataSource 示します。

<%@ Page Language="C#" %>
<%@ Register Tagprefix="aspSample" Namespace="Samples.AspNet" %>

<!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 runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
        <form id="form1" runat="server">

            <asp:treeview
                id="TreeView1"
                runat="server"
                datasourceid="FileSystemDataSource1" />            

            <aspSample:filesystemdatasource
                id = "FileSystemDataSource1"
                runat = "server" />            

        </form>
    </body>
</html>
<%@ Page Language="VB" %>
<%@ Register Tagprefix="aspSample" Namespace="Samples.AspNet" %>

<!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 runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
        <form id="form1" runat="server">

            <asp:treeview
                id="TreeView1"
                runat="server"
                datasourceid="FileSystemDataSource1" />            

            <aspSample:filesystemdatasource
                id = "FileSystemDataSource1"
                runat = "server" />            

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

注釈

ASP.NET では、Web サーバー コントロールがデータにバインドされ、一貫した方法で表示できるようにするコントロール のデータ バインディング アーキテクチャがサポートされています。 データにバインドする Web サーバー コントロールはデータ バインド コントロールと呼ばれ、バインドを容易にするクラスはデータ ソース コントロールと呼ばれます。 データ ソース コントロールは、ファイル、ストリーム、リレーショナル データベース、ビジネス オブジェクトなどの任意のデータ ソースを表すことができます。 データ ソース コントロールは、基になるデータのソースまたは形式に関係なく、データ バインド コントロールに対して一貫した方法でデータを表示します。

階層データを表すデータ ソース コントロールは クラスから HierarchicalDataSourceControl 派生し、データのリストまたはテーブルを表すデータ ソース コントロールは クラスから DataSourceControl 派生します。 クラスは HierarchicalDataSourceControl 、 インターフェイスの IHierarchicalDataSource 基本実装であり、データ ソース コントロール GetHierarchicalViewに関連付けられている階層データ ソース ビュー オブジェクトを取得する 1 つのメソッドを定義します。

データ ソース コントロールは、データ ソース ビュー オブジェクトと呼ばれる、基になるデータ上のオブジェクトとそれに関連付けられているビューの組み合わせ HierarchicalDataSourceControl と考えることができます。 通常、表形式データを表すデータ ソース コントロールは 1 つの名前付きビューにのみ関連付けられますが、 クラスは、 HierarchicalDataSourceControl データ ソース コントロールが表す階層データのレベルごとにデータ ソース ビューをサポートします。 階層データのレベルは、 パラメーターの メソッドに GetHierarchicalView 渡される一意の階層パスによって viewPath 識別されます。 各 HierarchicalDataSourceView オブジェクトは、表される階層レベルのデータ ソース コントロールの機能を定義し、挿入、更新、削除、並べ替えなどの操作を実行します。

などの TreeViewクラスからHierarchicalDataBoundControl派生する Web サーバー コントロールは、階層データ ソース コントロールを使用して階層データにバインドします。

データ ソース コントロールは、宣言型の永続化を可能にし、必要に応じて状態管理への参加を許可するコントロールとして実装されます。 データ ソース コントロールにはビジュアル レンダリングがないため、テーマはサポートされていません。

コンストラクター

HierarchicalDataSourceControl()

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

プロパティ

Adapter

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

(継承元 Control)
AppRelativeTemplateSourceDirectory

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

(継承元 Control)
BindingContainer

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

(継承元 Control)
ChildControlsCreated

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

(継承元 Control)
ClientID

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

ClientIDMode

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

ClientIDMode

ClientID プロパティの値を生成するために使用されるアルゴリズムを取得または設定します。

(継承元 Control)
ClientIDSeparator

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

(継承元 Control)
Context

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

(継承元 Control)
Controls

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

DataItemContainer

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

(継承元 Control)
DataKeysContainer

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

(継承元 Control)
DesignMode

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

(継承元 Control)
EnableTheming

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

EnableViewState

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

(継承元 Control)
Events

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

(継承元 Control)
HasChildViewState

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

(継承元 Control)
ID

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

(継承元 Control)
IdSeparator

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

(継承元 Control)
IsChildControlStateCleared

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

(継承元 Control)
IsTrackingViewState

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

(継承元 Control)
IsViewStateEnabled

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

(継承元 Control)
LoadViewStateByID

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

(継承元 Control)
NamingContainer

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

(継承元 Control)
Page

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

(継承元 Control)
Parent

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

(継承元 Control)
RenderingCompatibility

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

(継承元 Control)
Site

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

(継承元 Control)
SkinID

HierarchicalDataSourceControl コントロールに適用するスキンを取得または設定します。

TemplateControl

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

(継承元 Control)
TemplateSourceDirectory

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

(継承元 Control)
UniqueID

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

(継承元 Control)
ValidateRequestMode

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

(継承元 Control)
ViewState

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

(継承元 Control)
ViewStateIgnoresCase

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

(継承元 Control)
ViewStateMode

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

(継承元 Control)
Visible

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

メソッド

AddedControl(Control, Int32)

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

(継承元 Control)
AddParsedSubObject(Object)

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

(継承元 Control)
ApplyStyleSheetSkin(Page)

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

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()

サーバー コントロールの子コントロール (リテラルとサーバーの両方) を保持する新しい ControlCollection オブジェクトを作成します。

DataBind()

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

(継承元 Control)
DataBind(Boolean)

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

(継承元 Control)
DataBindChildren()

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

(継承元 Control)
Dispose()

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

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

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

(継承元 Control)
EnsureChildControls()

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

(継承元 Control)
EnsureID()

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

(継承元 Control)
Equals(Object)

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

(継承元 Object)
FindControl(String)

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

FindControl(String, Int32)

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

(継承元 Control)
Focus()

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

GetDesignModeState()

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

(継承元 Control)
GetHashCode()

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

(継承元 Object)
GetHierarchicalView(String)

IHierarchicalDataSource インターフェイスに対する、指定されたパスのビュー ヘルパー オブジェクトを取得します。

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)
HasControls()

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

HasEvents()

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

(継承元 Control)
IsLiteralContent()

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

(継承元 Control)
LoadControlState(Object)

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

(継承元 Control)
LoadViewState(Object)

SaveViewState() メソッドによって保存された前回のページ要求からビューステート情報を復元します。

(継承元 Control)
MapPathSecure(String)

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

(継承元 Control)
MemberwiseClone()

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

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

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

(継承元 Control)
OnDataBinding(EventArgs)

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

(継承元 Control)
OnDataSourceChanged(EventArgs)

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

OnInit(EventArgs)

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

(継承元 Control)
OnLoad(EventArgs)

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

(継承元 Control)
OnPreRender(EventArgs)

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

(継承元 Control)
OnUnload(EventArgs)

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

(継承元 Control)
OpenFile(String)

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

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

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

(継承元 Control)
RemovedControl(Control)

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

(継承元 Control)
Render(HtmlTextWriter)

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

(継承元 Control)
RenderChildren(HtmlTextWriter)

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

(継承元 Control)
RenderControl(HtmlTextWriter)

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

RenderControl(HtmlTextWriter, ControlAdapter)

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

(継承元 Control)
ResolveAdapter()

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

(継承元 Control)
ResolveClientUrl(String)

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

(継承元 Control)
ResolveUrl(String)

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

(継承元 Control)
SaveControlState()

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

(継承元 Control)
SaveViewState()

ページがサーバーにポスト バックされた時間以降に発生した、サーバー コントロールのビューステートの変更を保存します。

(継承元 Control)
SetDesignModeState(IDictionary)

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

(継承元 Control)
SetRenderMethodDelegate(RenderMethod)

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

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

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

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

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

(継承元 Control)
ToString()

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

(継承元 Object)
TrackViewState()

サーバー コントロールにビューステートの変更を追跡させ、サーバー コントロールの StateBag オブジェクトに変更を格納できるようにします。 このオブジェクトは、ViewState プロパティによってアクセスできます。

(継承元 Control)

イベント

DataBinding

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

(継承元 Control)
Disposed

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

(継承元 Control)
Init

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

(継承元 Control)
Load

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

(継承元 Control)
PreRender

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

(継承元 Control)
Unload

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

(継承元 Control)

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

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)
IExpressionsAccessor.Expressions

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

(継承元 Control)
IExpressionsAccessor.HasExpressions

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

(継承元 Control)
IHierarchicalDataSource.DataSourceChanged

データ バインド コントロールに影響を与える変更が HierarchicalDataSourceControl に加えられたときに発生します。

IHierarchicalDataSource.GetHierarchicalView(String)

IHierarchicalDataSource インターフェイスに対する、指定されたパスのビュー ヘルパー オブジェクトを取得します。

IParserAccessor.AddParsedSubObject(Object)

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

(継承元 Control)

拡張メソッド

FindDataSourceControl(Control)

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

FindFieldTemplate(Control, String)

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

FindMetaTable(Control)

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

適用対象

こちらもご覧ください