Share via


SiteMapPath.PathSeparatorTemplate Özellik

Tanım

Bir site gezinti yolunun yol sınırlayıcısı için kullanılacak bir denetim şablonunu alır veya ayarlar.

public:
 virtual property System::Web::UI::ITemplate ^ PathSeparatorTemplate { System::Web::UI::ITemplate ^ get(); void set(System::Web::UI::ITemplate ^ value); };
[System.ComponentModel.Browsable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.SiteMapNodeItem))]
public virtual System.Web.UI.ITemplate PathSeparatorTemplate { get; set; }
[<System.ComponentModel.Browsable(false)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
[<System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.SiteMapNodeItem))>]
member this.PathSeparatorTemplate : System.Web.UI.ITemplate with get, set
Public Overridable Property PathSeparatorTemplate As ITemplate

Özellik Değeri

Bir ITemplate gezinti yolunun InstantiateIn(Control) yol sınırlayıcısı için özel içerik işlemek için yöntemini uygulayan bir nesne.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, web Image formunda bildirim temelli olarak PathSeparatorTemplate tanımlamayı gösterir.

<%@ 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 runat="server">
    <title>About Us</title>
</head>
<body>
    <form id="Form1" method="post" runat="server">
      <asp:SiteMapPath
          runat="server"
          ID="SiteMapPath1"
          RootNodeStyle-Font-Names="Verdana"
          RootNodeStyle-Font-Italic="True"
          RootNodeStyle-ForeColor="Blue"
          CurrentNodeStyle-ForeColor="Red">
          <PATHSEPARATORTEMPLATE>
              <asp:Image id="Image1" runat="server" 
                GenerateEmptyAlternateText="true" 
                ImageUrl="6.jpg"></asp:Image>
          </PATHSEPARATORTEMPLATE>
        </asp:SiteMapPath>
        <h1>About Us</h1>
      <p>This company was founded in 1899, as the demand for widgets grew.</p>
    </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">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>About Us</title>
</head>
<body>
    <form id="Form1" method="post" runat="server">
      <asp:SiteMapPath
          runat="server"
          ID="SiteMapPath1"
          RootNodeStyle-Font-Names="Verdana"
          RootNodeStyle-Font-Italic="True"
          RootNodeStyle-ForeColor="Blue"
          CurrentNodeStyle-ForeColor="Red">
          <PATHSEPARATORTEMPLATE>
              <asp:Image id="Image1" runat="server" 
                GenerateEmptyAlternateText="true" 
                ImageUrl="6.jpg"></asp:Image>
          </PATHSEPARATORTEMPLATE>
        </asp:SiteMapPath>
        <h1>About Us</h1>
      <p>This company was founded in 1899, as the demand for widgets grew.</p>
    </form>
  </body>
</html>

Açıklamalar

PathSeparatorTemplateITemplate dize yerine PathSeparator gezinti düğümleri arasındaki yol sınırlayıcısı olarak veya gibi başka bir ImageLabeldenetimi kullanmak için nesnesini olarak ayarlayın.

PathSeparatorTemplate Özellik ayarlanırsa, şablon hem görüntülenen metni hem de PathSeparator uygulanan metni PathSeparatorStyle geçersiz kılar.

Özelliğini bildirimli olarak herhangi bir Web sunucusu denetimine ayarlayabilirsiniz PathSeparatorTemplate ve ASP.NET altyapısı, Web sunucusu denetimini olarak ITemplatesarmamak için gerekli adımları gerçekleştirir. Ancak, Web sunucusu denetimleri arabirimini uygulamaz ITemplate ; bu nedenle, özelliklerle ITemplate program aracılığıyla çalışırken, herhangi bir şablon kodu için bir ITemplate sarmalayıcı yazmanız gerekir. Ardından özelliği sarmalayıcının PathSeparatorTemplateITemplate bir örneğine ayarlanır.

Şunlara uygulanır

Ayrıca bkz.