SiteMapPath クラス

定義

最小限のページ領域で、より簡単に Web サイト内を移動できるようにする、一連のテキストやイメージのハイパーリンクを表示します。

public ref class SiteMapPath : System::Web::UI::WebControls::CompositeControl
public class SiteMapPath : System.Web.UI.WebControls.CompositeControl
type SiteMapPath = class
    inherit CompositeControl
Public Class SiteMapPath
Inherits CompositeControl
継承

次のコード例では、SiteMapPathWeb Forms ページでコントロールを宣言的に使用します。 この例では、テンプレートとスタイルがノードに適用される順序を制御する優先順位の規則の一部を SiteMapPath 示します。

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
        <form id="form1" runat="server">

            <!-- The following example demonstrates some of the orders
                 of precedence when applying styles and templates to
                 functional nodes of a SiteMapPath.

                 The NodeStyle and RootNodeStyle define the same attributes,
                 but are different and conflict with each other: the
                 RootNodeStyle supersedes NodeStyle, and is the style
                 rendered. Notice, however, that the underline style
                 defined by NodeStyle is still applied.

                 Both a CurrentNodeStyle and a CurrentNodeTemplate are
                 defined. A template supersedes a style for a node
                 type, so CurrentNodeTemplate is displayed and CurrentNodeStyle
                 is ignored. -->

            <asp:SiteMapPath ID="SiteMapPath1" runat="server"
                RenderCurrentNodeAsLink="true"
                NodeStyle-Font-Names="Franklin Gothic Medium"
                NodeStyle-Font-Underline="true"
                NodeStyle-Font-Bold="true"
                RootNodeStyle-Font-Names="Symbol"
                RootNodeStyle-Font-Bold="false"
                CurrentNodeStyle-Font-Names="Verdana"
                CurrentNodeStyle-Font-Size="10pt"
                CurrentNodeStyle-Font-Bold="true"
                CurrentNodeStyle-ForeColor="red"
                CurrentNodeStyle-Font-Underline="false">
                <CURRENTNODETEMPLATE>
                        <asp:Image id="Image1" runat="server" ImageUrl="WebForm2.jpg" AlternateText="WebForm2"/>
                </CURRENTNODETEMPLATE>
            </asp:SiteMapPath>


        </form>
    </body>
</html>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
        <form id="form1" runat="server">

            <!-- The following example demonstrates some of the orders
                 of precedence when applying styles and templates to
                 functional nodes of a SiteMapPath.

                 The NodeStyle and RootNodeStyle define the same attributes,
                 but are different and conflict with each other: the
                 RootNodeStyle supersedes NodeStyle, and is the style
                 rendered. Notice, however, that the underline style
                 defined by NodeStyle is still applied.

                 Both a CurrentNodeStyle and a CurrentNodeTemplate are
                 defined. A template supersedes a style for a node
                 type, so CurrentNodeTemplate is displayed and CurrentNodeStyle
                 is ignored. -->

            <asp:SiteMapPath ID="SiteMapPath1" runat="server"
                RenderCurrentNodeAsLink="true"
                NodeStyle-Font-Names="Franklin Gothic Medium"
                NodeStyle-Font-Underline="true"
                NodeStyle-Font-Bold="true"
                RootNodeStyle-Font-Names="Symbol"
                RootNodeStyle-Font-Bold="false"
                CurrentNodeStyle-Font-Names="Verdana"
                CurrentNodeStyle-Font-Size="10pt"
                CurrentNodeStyle-Font-Bold="true"
                CurrentNodeStyle-ForeColor="red"
                CurrentNodeStyle-Font-Underline="false">
                <CURRENTNODETEMPLATE>
                        <asp:Image id="Image1" runat="server" ImageUrl="WebForm2.jpg" AlternateText="WebForm2"/>
                </CURRENTNODETEMPLATE>
            </asp:SiteMapPath>


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

前の例では、既定のサイト マップ プロバイダーと、次の構造の Web.sitemap ファイルを使用します。

<siteMap>
  <siteMapNode title="WebForm1" description="WebForm1" url="WebForm1.aspx" >
    <siteMapNode title="WebForm2" description="WebForm2" url="WebForm2.aspx"/>
  </siteMapNode>
</siteMap>

次のコード例では、 コントロールを拡張し、 メソッドを SiteMapPath オーバーライドすることで新しい機能を追加する方法を InitializeItem 示します。 コントロールは DropDownSiteMapPath 、現在のページの子ノードであるページへの簡単なナビゲーションを可能にするために、現在のノードの後に を追加 DropDownList します。 この例では、オブジェクトを確認したり、項目の作成後に メソッドをSiteMapNodeItemType呼び出したりするなど、オブジェクトをOnItemCreated操作SiteMapNodeItemする方法を示します。

using System;
using System.Collections;
using System.ComponentModel;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

// The DropDownNavigationPath is a class that extends the SiteMapPath
// control and renders a DropDownList after the CurrentNode. The
// DropDownList displays a list of pages found further down the site map
// hierarchy from the current one. Selecting an item in the DropDownList
// redirects to that page.
//
// For simplicity, the DropDownNavigationPath assumes the
// RootToCurrent PathDirection, and does not apply styles
// or templates the current node.
//
[AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)]
public class DropDownNavigationPath : SiteMapPath {
    // Override the InitializeItem method to add a PathSeparator
    // and DropDownList to the current node.
    protected override void InitializeItem(SiteMapNodeItem item) {

        // The only node that must be handled is the CurrentNode.
        if (item.ItemType == SiteMapNodeItemType.Current)
        {
            HyperLink hLink = new HyperLink();

            // No Theming for the HyperLink.
            hLink.EnableTheming = false;
            // Enable the link of the SiteMapPath is enabled.
            hLink.Enabled = this.Enabled;

            // Set the properties of the HyperLink to
            // match those of the corresponding SiteMapNode.
            hLink.NavigateUrl = item.SiteMapNode.Url;
            hLink.Text        = item.SiteMapNode.Title;
            if (ShowToolTips) {
                hLink.ToolTip = item.SiteMapNode.Description;
            }

            // Apply styles or templates to the HyperLink here.
            // ...
            // ...

            // Add the item to the Controls collection.
            item.Controls.Add(hLink);

            AddDropDownListAfterCurrentNode(item);
        }
        else {
            base.InitializeItem(item);
        }
    }
    private void AddDropDownListAfterCurrentNode(SiteMapNodeItem item) {

        SiteMapNodeCollection childNodes = item.SiteMapNode.ChildNodes;

        // Only do this work if there are child nodes.
        if (childNodes != null) {

            // Add another PathSeparator after the CurrentNode.
            SiteMapNodeItem finalSeparator =
                new SiteMapNodeItem(item.ItemIndex,
                                    SiteMapNodeItemType.PathSeparator);

            SiteMapNodeItemEventArgs eventArgs =
                new SiteMapNodeItemEventArgs(finalSeparator);

            InitializeItem(finalSeparator);
            // Call OnItemCreated every time a SiteMapNodeItem is
            // created and initialized.
            OnItemCreated(eventArgs);

            // The pathSeparator does not bind to any SiteMapNode, so
            // do not call DataBind on the SiteMapNodeItem.
            item.Controls.Add(finalSeparator);

            // Create a DropDownList and populate it with the children of the
            // CurrentNode. There are no styles or templates that are applied
            // to the DropDownList control. If OnSelectedIndexChanged is raised,
            // the event handler redirects to the page selected.
            // The CurrentNode has child nodes.
            DropDownList ddList = new DropDownList();
            ddList.AutoPostBack = true;

            ddList.SelectedIndexChanged += new EventHandler(this.DropDownNavPathEventHandler);

            // Add a ListItem to the DropDownList for every node in the
            // SiteMapNodes collection.
            foreach (SiteMapNode node in childNodes) {
                ddList.Items.Add(new ListItem(node.Title, node.Url));
            }

            item.Controls.Add(ddList);
        }
    }

    // The sender is the DropDownList.
    private void DropDownNavPathEventHandler(object sender,EventArgs e) {
        DropDownList ddL = sender as DropDownList;

        // Redirect to the page the user chose.
        if (Context != null)
            Context.Response.Redirect(ddL.SelectedValue);
    }
}
Imports System.Collections
Imports System.ComponentModel
Imports System.Security.Permissions
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls

Namespace Samples.AspNet

' The DropDownNavigationPath is a class that extends the SiteMapPath
' control and renders a DropDownList after the CurrentNode. The
' DropDownList displays a list of pages found further down the site map
' hierarchy from the current one. Selecting an item in the DropDownList
' redirects to that page.
'
' For simplicity, the DropDownNavigationPath assumes the
' RootToCurrent PathDirection, and does not apply styles
' or templates the current node.
'
<AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)> _
Public Class DropDownNavigationPath
   Inherits SiteMapPath

   ' Override the InitializeItem method to add a PathSeparator
   ' and DropDownList to the current node.
   Protected Overrides Sub InitializeItem(item As SiteMapNodeItem)

      ' The only node that must be handled is the CurrentNode.
      If item.ItemType = SiteMapNodeItemType.Current Then
         Dim hLink As New HyperLink()

         ' No Theming for the HyperLink.
         hLink.EnableTheming = False
         ' Enable the link of the SiteMapPath is enabled.
         hLink.Enabled = Me.Enabled

         ' Set the properties of the HyperLink to
         ' match those of the corresponding SiteMapNode.
         hLink.NavigateUrl = item.SiteMapNode.Url
         hLink.Text = item.SiteMapNode.Title
         If ShowToolTips Then
            hLink.ToolTip = item.SiteMapNode.Description
         End If

         ' Apply styles or templates to the HyperLink here.
         ' ...
         ' ...
         ' Add the item to the Controls collection.
         item.Controls.Add(hLink)

         AddDropDownListAfterCurrentNode(item)
      Else
         MyBase.InitializeItem(item)
      End If
   End Sub

   Private Sub AddDropDownListAfterCurrentNode(item As SiteMapNodeItem)

      Dim childNodes As SiteMapNodeCollection = item.SiteMapNode.ChildNodes

      ' Only do this work if there are child nodes.
      If Not (childNodes Is Nothing) Then

         ' Add another PathSeparator after the CurrentNode.
         Dim finalSeparator As New SiteMapNodeItem(item.ItemIndex, SiteMapNodeItemType.PathSeparator)

         Dim eventArgs As New SiteMapNodeItemEventArgs(finalSeparator)

         InitializeItem(finalSeparator)
         ' Call OnItemCreated every time a SiteMapNodeItem is
         ' created and initialized.
         OnItemCreated(eventArgs)

         ' The pathSeparator does not bind to any SiteMapNode, so
         ' do not call DataBind on the SiteMapNodeItem.
         item.Controls.Add(finalSeparator)

         ' Create a DropDownList and populate it with the children of the
         ' CurrentNode. There are no styles or templates that are applied
         ' to the DropDownList control. If OnSelectedIndexChanged is raised,
         ' the event handler redirects to the page selected.
         ' The CurrentNode has child nodes.
         Dim ddList As New DropDownList()
         ddList.AutoPostBack = True

         AddHandler ddList.SelectedIndexChanged, AddressOf Me.DropDownNavPathEventHandler

         ' Add a ListItem to the DropDownList for every node in the
         ' SiteMapNodes collection.
         Dim node As SiteMapNode
         For Each node In  childNodes
            ddList.Items.Add(New ListItem(node.Title, node.Url))
         Next node

         item.Controls.Add(ddList)
      End If
   End Sub

   ' The sender is the DropDownList.
   Private Sub DropDownNavPathEventHandler(sender As Object, e As EventArgs)
      Dim ddL As DropDownList = CType(sender, DropDownList)

      ' Redirect to the page the user chose.
      If Not (Context Is Nothing) Then
         Context.Response.Redirect(ddL.SelectedValue)
      End If

   End Sub
End Class
End Namespace

注釈

このトピックの内容:

はじめに

コントロールは SiteMapPath 、オブジェクトによって SiteMap 提供されるデータを反映するサイト ナビゲーション コントロールです。 これは、サイト内を簡単に移動するための省スペースの方法を提供し、現在表示されているページがサイト内にある場所の参照ポイントとして機能します。 この種類のコントロールは、現在の場所からページの階層へのエスケープを提供するハイパーリンクされたページ名の階層パスを表示するため、一般に階層リンク (またはアイブロウ) と呼ばれます。 SiteMapDataSource. SiteMapPathは、ページ構造が深いが、 または Menu がページ上に必要な領域がTreeView多すぎるサイトに便利です。

コントロールは SiteMapPath 、Web サイトのサイト マップ データと直接連携します。 サイト マップに表示されていないページで使用した場合、表示されません。 サイト マップの詳細については、「 サイト ナビゲーションの ASP.NET」を参照してください。

Nodes

SiteMapPath ノードで構成されます。 パス内の各要素はノードと呼ばれ、 オブジェクトによって SiteMapNodeItem 表されます。 パスを固定し、階層ツリーのベースを表すノードをルート ノードと呼びます。 現在表示されているページを表すノードは、現在のノードです。 現在のノードとルート ノードの間の他のノードは親ノードです。 次の表では、3 つの異なるノードの種類について説明します。

ノード型 説明
root ノードの階層セットを固定するノード。
parent 1 つ以上の子ノードを持つが、現在のノードではないノード。
現在の 現在表示されているページを表すノード。

ノードの外観

によって SiteMapPath 表示される各ノードは、 HyperLink コントロールまたは Literal コントロールであり、テンプレートまたはスタイルを適用できます。 テンプレートとスタイルは、次の 2 つの優先順位の規則に従ってノードに適用されます。

  • テンプレートがノードに対して定義されている場合、そのノードに対して定義されているスタイルがオーバーライドされます。

  • ノードの種類に固有のテンプレートとスタイルは、すべてのノードに対して定義されている一般的なテンプレートとスタイルをオーバーライドします。

NodeStyleプロパティと NodeTemplate プロパティは、ノードの種類に関係なく、すべてのノードに適用されます。 これらのプロパティの両方が定義されている場合は、 が NodeTemplate 優先されます。

CurrentNodeTemplateプロパティと CurrentNodeStyle プロパティは、現在表示されているページを表すノードに適用されます。 NodeTemplateに加えて CurrentNodeTemplateが定義されている場合は無視されます。 NodeStyleが にCurrentNodeStyle加えて定義されている場合は、 とCurrentNodeStyleマージされ、結合されたスタイルが作成されます。 この結合されたスタイルでは、 のすべての要素 CurrentNodeStyleと、 と競合しない の NodeStyle 追加要素が CurrentNodeStyle使用されます。

RootNodeTemplateプロパティと RootNodeStyle プロパティは、サイト ナビゲーション階層のルートを表すノードに適用されます。 NodeTemplateに加えて RootNodeTemplateが定義されている場合は無視されます。 NodeStyleが にRootNodeStyle加えて定義されている場合は、 とRootNodeStyleマージされ、結合されたスタイルが作成されます。 この結合されたスタイルでは、 のすべての要素RootNodeStyleに加えて、 とCurrentNodeStyle競合しなかった のNodeStyle追加要素が使用されます。 最後に、現在表示されているページがサイトのルート ページである場合は、 RootNodeTemplate または CurrentNodeStyleの代わりに と RootNodeStyleCurrentNodeTemplate使用されます。

コントロールは SiteMapPath 、 プロパティによって識別されるサイト マップ プロバイダーを SiteMapProvider 、サイト ナビゲーション情報のデータ ソースとして使用します。 プロバイダーが指定されていない場合は、 プロパティで識別されるサイトの既定のプロバイダーが SiteMap.Provider 使用されます。 通常、これは、ASP.NET の既定のサイト マップ プロバイダーのインスタンスです XmlSiteMapProvider。 コントロールが SiteMapPath サイト内で使用されているが、サイト マップ プロバイダーが構成されていない場合、コントロールは例外を HttpException スローします。

events

コントロールには SiteMapPath 、プログラミングに使用できるイベントも用意されています。 これにより、イベントが発生するたびにカスタム ルーチンを実行できます。 次の表に、 コントロールでサポートされているイベントの一覧を SiteMapPath 示します。

Event 説明
ItemCreated コントロールが最初に を SiteMapPath 作成 SiteMapNodeItem し、それを に関連付けると発生 SiteMapNodeします。
ItemDataBound が に含まれるサイト マップ データにバインドされたときに SiteMapNodeItem 発生します SiteMapNode

SiteMapPath コントロールのカスタマイズ

から SiteMapPath 派生したクラスは、 メソッドを InitializeItem オーバーライドして、ナビゲーション コントロールに SiteMapNodeItem 含まれるコントロールをカスタマイズします。 オブジェクトを作成して に追加する方法 SiteMapNodeItem を完全に制御するために SiteMapPath、派生クラスは メソッドを CreateControlHierarchy オーバーライドします。

ユーザー補助

アクセシビリティ標準に準拠するマークアップを生成するようにこのコントロールを構成する方法については、「 Visual Studio のアクセシビリティ 」および「ASP.NET および ASP.NET コントロールとアクセシビリティ」を参照してください。

宣言構文

<asp:SiteMapPath
    AccessKey="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
        Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    Enabled="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
        Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    ID="string"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnItemCreated="ItemCreated event handler"
    OnItemDataBound="ItemDataBound event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnUnload="Unload event handler"
    ParentLevelsDisplayed="integer"
    PathDirection="RootToCurrent|CurrentToRoot"
    PathSeparator="string"
    RenderCurrentNodeAsLink="True|False"
    runat="server"
    ShowToolTips="True|False"
    SiteMapProvider="string"
    SkinID="string"
    SkipLinkText="string"
    Style="string"
    TabIndex="integer"
    ToolTip="string"
    Visible="True|False"
    Width="size"
>
        <CurrentNodeStyle />
        <CurrentNodeTemplate>
            <!-- child controls -->
        </CurrentNodeTemplate>
        <NodeStyle />
        <NodeTemplate>
            <!-- child controls -->
        </NodeTemplate>
        <PathSeparatorStyle />
        <PathSeparatorTemplate>
            <!-- child controls -->
        </PathSeparatorTemplate>
        <RootNodeStyle />
        <RootNodeTemplate>
            <!-- child controls -->
        </RootNodeTemplate>
</asp:SiteMapPath>

コンストラクター

SiteMapPath()

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

プロパティ

AccessKey

Web サーバー コントロールにすばやく移動できるアクセス キーを取得または設定します。

(継承元 WebControl)
Adapter

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

(継承元 Control)
AppRelativeTemplateSourceDirectory

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

(継承元 Control)
Attributes

コントロールのプロパティに対応しない任意の属性 (表示専用) のコレクションを取得します。

(継承元 WebControl)
BackColor

Web サーバー コントロールの背景色を取得または設定します。

(継承元 WebControl)
BindingContainer

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

(継承元 Control)
BorderColor

Web コントロールの境界線の色を取得または設定します。

(継承元 WebControl)
BorderStyle

Web サーバー コントロールの境界線スタイルを取得または設定します。

(継承元 WebControl)
BorderWidth

Web サーバー コントロールの境界線の幅を取得または設定します。

(継承元 WebControl)
ChildControlsCreated

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

(継承元 Control)
ClientID

ASP.NET によって生成される HTML マークアップのコントロール ID を取得します。

(継承元 Control)
ClientIDMode

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

(継承元 Control)
ClientIDSeparator

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

(継承元 Control)
Context

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

(継承元 Control)
Controls

ControlCollection 内の子コントロールを表す CompositeControl オブジェクトを取得します。

(継承元 CompositeControl)
ControlStyle

Web サーバー コントロールのスタイルを取得します。 このプロパティは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
ControlStyleCreated

Style オブジェクトが ControlStyle プロパティに対して作成されたかどうかを示す値を取得します。 このプロパティは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
CssClass

クライアントで Web サーバー コントロールによって表示されるカスケード スタイル シート (CSS: Cascading Style Sheet) クラスを取得または設定します。

(継承元 WebControl)
CurrentNodeStyle

現在のノードの表示テキストに使用されるスタイルを取得します。

CurrentNodeTemplate

現在表示されているページを表すサイト ナビゲーション パスのノードに使用するコントロール テンプレートを取得または設定します。

DataItemContainer

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

(継承元 Control)
DataKeysContainer

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

(継承元 Control)
DesignMode

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

(継承元 Control)
Enabled

Web サーバー コントロールを有効にするかどうかを示す値を取得または設定します。

(継承元 WebControl)
EnableTheming

テーマがこのコントロールに適用されるかどうかを示す値を取得または設定します。

(継承元 WebControl)
EnableViewState

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

(継承元 Control)
Events

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

(継承元 Control)
Font

Web サーバー コントロールに関連付けられたフォント プロパティを取得します。

(継承元 WebControl)
ForeColor

Web サーバー コントロールの前景色 (通常はテキストの色) を取得または設定します。

(継承元 WebControl)
HasAttributes

コントロールに属性セットがあるかどうかを示す値を取得します。

(継承元 WebControl)
HasChildViewState

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

(継承元 Control)
Height

Web サーバー コントロールの高さを取得または設定します。

(継承元 WebControl)
ID

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

(継承元 Control)
IdSeparator

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

(継承元 Control)
IsChildControlStateCleared

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

(継承元 Control)
IsEnabled

コントロールが有効かどうかを示す値を取得します。

(継承元 WebControl)
IsTrackingViewState

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

(継承元 Control)
IsViewStateEnabled

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

(継承元 Control)
LoadViewStateByID

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

(継承元 Control)
NamingContainer

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

(継承元 Control)
NodeStyle

サイト ナビゲーション パスのすべてのノードで表示テキストに使用するスタイルを取得します。

NodeTemplate

サイト ナビゲーション パスのすべての機能ノードに使用するコントロール テンプレートを取得まはた設定します。

Page

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

(継承元 Control)
Parent

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

(継承元 Control)
ParentLevelsDisplayed

現在表示されているノードを基準に、コントロールが表示する親ノードのレベルの数を取得または設定します。

PathDirection

ナビゲーション パスの各ノードが表示される順序を取得または設定します。

PathSeparator

表示されたナビゲーション パスの各 SiteMapPath ノードを区切る文字列を取得または設定します。

PathSeparatorStyle

PathSeparator の文字列に使用するスタイルを取得します。

PathSeparatorTemplate

サイト ナビゲーション パスのパス デリミターに使用するコントロール テンプレートを取得または設定します。

Provider

Web サーバー コントロールに関連付けられた SiteMapProvider を取得または設定します。

RenderCurrentNodeAsLink

現在表示されているページを表すサイト ナビゲーション ノードがハイパーリンクとして表示されるかどうかを示します。

RenderingCompatibility

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

(継承元 Control)
RootNodeStyle

ルート ノードの表示テキストのスタイルを取得します。

RootNodeTemplate

サイト ナビゲーション パスのルート ノードに使用するコントロール テンプレートを取得または設定します。

ShowToolTips

SiteMapPath コントロールが、ハイパーリンクのナビゲーション ノードに追加のハイパーリンク属性を書き込むかどうかを示す値を取得または設定します。 クライアントのサポートによっては、追加の属性セットを設定したハイパーリンクの上にマウスを移動するとツールヒントが表示されます。

Site

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

(継承元 Control)
SiteMapProvider

サイト ナビゲーション コントロールを表示するために使用する SiteMapProvider の名前を取得または設定します。

SkinID

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

(継承元 WebControl)
SkipLinkText

コントロールのコンテンツをスキップするスクリーン リーダー用の代替テキスト表示に使用する値を取得または設定します。

Style

Web サーバー コントロールの外側のタグにスタイル属性として表示されるテキスト属性のコレクションを取得します。

(継承元 WebControl)
SupportsDisabledAttribute

コントロールの disabled プロパティが IsEnabled の場合、レンダリングされた HTML 要素の false 属性を "無効" に設定するかどうかを示す値を取得します。

(継承元 CompositeControl)
TabIndex

Web サーバー コントロールのタブ インデックスを取得または設定します。

(継承元 WebControl)
TagKey

この Web サーバー コントロールに対応する HtmlTextWriterTag 値を取得します。 このプロパティは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
TagName

コントロール タグの名前を取得します。 このプロパティは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
TemplateControl

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

(継承元 Control)
TemplateSourceDirectory

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

(継承元 Control)
ToolTip

マウス ポインターが Web サーバー コントロールの上を移動したときに表示されるテキストを取得または設定します。

(継承元 WebControl)
UniqueID

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

(継承元 Control)
ValidateRequestMode

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

(継承元 Control)
ViewState

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

(継承元 Control)
ViewStateIgnoresCase

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

(継承元 Control)
ViewStateMode

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

(継承元 Control)
Visible

サーバー コントロールがページ上の UI としてレンダリングされているかどうかを示す値を取得または設定します。

(継承元 Control)
Width

Web サーバー コントロールの幅を取得または設定します。

(継承元 WebControl)

メソッド

AddAttributesToRender(HtmlTextWriter)

指定した HtmlTextWriterTag に表示する必要のある HTML 属性およびスタイルを追加します。 このメソッドは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
AddedControl(Control, Int32)

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

(継承元 Control)
AddParsedSubObject(Object)

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

(継承元 Control)
ApplyStyle(Style)

指定したスタイルの空白以外の要素を Web コントロールにコピーして、コントロールの既存のスタイル要素を上書きします。 このメソッドは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
ApplyStyleSheetSkin(Page)

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

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

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

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

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

(継承元 Control)
ClearCachedClientID()

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

(継承元 Control)
ClearChildControlState()

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

(継承元 Control)
ClearChildState()

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

(継承元 Control)
ClearChildViewState()

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

(継承元 Control)
ClearEffectiveClientIDMode()

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

(継承元 Control)
CopyBaseAttributes(WebControl)

指定した Web サーバー コントロールから、Style オブジェクトでカプセル化されていないプロパティをこのメソッドの呼び出し元の Web サーバー コントロールにコピーします。 このメソッドは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
CreateChildControls()

現在の子コントロールのコレクションを消去し、CreateControlHierarchy() メソッドを呼び出して再構築します。

CreateControlCollection()

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

(継承元 Control)
CreateControlHierarchy()

SiteMapProvider によって提供されるサイト マップ構造を調べ、機能ノードに定義されたスタイルとテンプレートに基づいて子コントロールのコレクションを構築します。

CreateControlStyle()

WebControl クラスで、すべてのスタイル関連プロパティを実装するために内部的に使用されるスタイル オブジェクトを作成します。 このメソッドは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
DataBind()

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

DataBind(Boolean)

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

(継承元 Control)
DataBindChildren()

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

(継承元 Control)
Dispose()

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

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

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

(継承元 Control)
EnsureChildControls()

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

(継承元 Control)
EnsureID()

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

(継承元 Control)
Equals(Object)

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

(継承元 Object)
FindControl(String)

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

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

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

(継承元 Control)
Focus()

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

(継承元 Control)
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)
HasControls()

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

(継承元 Control)
HasEvents()

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

(継承元 Control)
InitializeItem(SiteMapNodeItem)

SiteMapNodeItem を表す Web サーバー コントロールの SiteMapNode に、ノードの機能およびノードに指定したテンプレートとスタイルに基づいて一連の子コントロールを読み込みます。

IsLiteralContent()

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

(継承元 Control)
LoadControlState(Object)

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

(継承元 Control)
LoadViewState(Object)

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

MapPathSecure(String)

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

(継承元 Control)
MemberwiseClone()

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

(継承元 Object)
MergeStyle(Style)

指定したスタイルの空白以外の要素を Web コントロールにコピーしますが、コントロールの既存のスタイル要素は上書きしません。 このメソッドは、主にコントロールの開発者によって使用されます。

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

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

(継承元 Control)
OnDataBinding(EventArgs)

OnDataBinding(EventArgs) クラスの CompositeControl をオーバーライドし、DataBinding イベントを発生させます。

OnInit(EventArgs)

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

(継承元 Control)
OnItemCreated(SiteMapNodeItemEventArgs)

ItemCreated コントロールの SiteMapPath イベントを発生させます。

OnItemDataBound(SiteMapNodeItemEventArgs)

ItemDataBound コントロールの SiteMapPath イベントを発生させます。

OnLoad(EventArgs)

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

(継承元 Control)
OnPreRender(EventArgs)

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

(継承元 Control)
OnUnload(EventArgs)

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

(継承元 Control)
OpenFile(String)

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

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

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

(継承元 Control)
RecreateChildControls()

CompositeControl から派生したコントロール内に子コントロールを再作成します。

(継承元 CompositeControl)
RemovedControl(Control)

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

(継承元 Control)
Render(HtmlTextWriter)

クライアントに表示するために、指定した CompositeControl オブジェクトに HtmlTextWriter の内容を書き込みます。

RenderBeginTag(HtmlTextWriter)

コントロールの HTML 開始タグを指定したライターに表示します。 このメソッドは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
RenderChildren(HtmlTextWriter)

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

(継承元 Control)
RenderContents(HtmlTextWriter)

SiteMapPath コントロールの各ノードを表示します。

RenderControl(HtmlTextWriter)

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

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

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

(継承元 Control)
RenderEndTag(HtmlTextWriter)

コントロールの HTML 終了タグを指定したライターに表示します。 このメソッドは、主にコントロールの開発者によって使用されます。

(継承元 WebControl)
ResolveAdapter()

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

(継承元 Control)
ResolveClientUrl(String)

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

(継承元 Control)
ResolveUrl(String)

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

(継承元 Control)
SaveControlState()

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

(継承元 Control)
SaveViewState()

SiteMapPath コントロールのビューステートに対する変更を保存します。

SetDesignModeState(IDictionary)

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

(継承元 Control)
SetRenderMethodDelegate(RenderMethod)

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

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

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

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

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

(継承元 Control)
ToString()

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

(継承元 Object)
TrackViewState()

SiteMapPath コントロールのビューステートの変更を追跡します。

イベント

DataBinding

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

(継承元 Control)
Disposed

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

(継承元 Control)
Init

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

(継承元 Control)
ItemCreated

SiteMapNodeItem によって SiteMapPath が作成され、その対応する SiteMapNode に関連付けられたときに発生します。 このイベントは、OnItemCreated(SiteMapNodeItemEventArgs) メソッドによって発生します。

ItemDataBound

SiteMapNodeItem によって、SiteMapNode がその基になる SiteMapPath データにバインドされた後に発生します。 このイベントは、OnItemDataBound(SiteMapNodeItemEventArgs) メソッドによって発生します。

Load

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

(継承元 Control)
PreRender

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

(継承元 Control)
Unload

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

(継承元 Control)

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

IAttributeAccessor.GetAttribute(String)

指定された名前の Web コントロールの属性を取得します。

(継承元 WebControl)
IAttributeAccessor.SetAttribute(String, String)

Web コントロールの属性を指定された名前と値に設定します。

(継承元 WebControl)
ICompositeControlDesignerAccessor.RecreateChildControls()

デザイナーが、デザイン時環境で子コントロールの複合コントロールのコレクションを再作成できるようにします。

(継承元 CompositeControl)
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)
IParserAccessor.AddParsedSubObject(Object)

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

(継承元 Control)

拡張メソッド

FindDataSourceControl(Control)

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

FindFieldTemplate(Control, String)

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

FindMetaTable(Control)

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

GetDefaultValues(INamingContainer)

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

GetMetaTable(INamingContainer)

指定されたデータ コントロールのテーブル メタデータを取得します。

SetMetaTable(INamingContainer, MetaTable)

指定されたデータ コントロールのテーブル メタデータを設定します。

SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>)

指定したデータ コントロールのテーブル メタデータおよび既定値のマッピングを設定します。

SetMetaTable(INamingContainer, MetaTable, Object)

指定したデータ コントロールのテーブル メタデータおよび既定値のマッピングを設定します。

TryGetMetaTable(INamingContainer, MetaTable)

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

EnableDynamicData(INamingContainer, Type)

指定されたデータ コントロールの動的データの動作を有効にします。

EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>)

指定されたデータ コントロールの動的データの動作を有効にします。

EnableDynamicData(INamingContainer, Type, Object)

指定されたデータ コントロールの動的データの動作を有効にします。

適用対象

こちらもご覧ください