Menu.DynamicBottomSeparatorImageUrl 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 URL 為圖片,顯示在每個動態選單項目底部,以區分它與其他選單項目。
public:
property System::String ^ DynamicBottomSeparatorImageUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.Themeable(true)]
public string DynamicBottomSeparatorImageUrl { get; set; }
[<System.Web.UI.Themeable(true)>]
member this.DynamicBottomSeparatorImageUrl : string with get, set
Public Property DynamicBottomSeparatorImageUrl As String
屬性值
每個動態選單項目底部會顯示分隔符圖片的網址。 預設值為空字串(“”),表示此屬性未被設定。
- 屬性
範例
以下程式碼範例示範如何利用該 DynamicBottomSeparatorImageUrl 屬性在每個動態選單項目底部顯示分隔符圖片。
<%@ 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>Menu DynamicBottomSeparatorImageUrl Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu DynamicBottomSeparatorImageUrl Example</h3>
<asp:menu id="NavigationMenu"
dynamicbottomseparatorimageurl="Images\Separator.jpg"
staticdisplaylevels="1"
orientation="Vertical"
runat="server">
<items>
<asp:menuitem navigateurl="Home.aspx"
text="Home"
tooltip="Home">
<asp:menuitem navigateurl="Music.aspx"
text="Music"
tooltip="Music">
<asp:menuitem navigateurl="Classical.aspx"
text="Classical"
tooltip="Classical"/>
<asp:menuitem navigateurl="Rock.aspx"
text="Rock"
tooltip="Rock"/>
<asp:menuitem navigateurl="Jazz.aspx"
text="Jazz"
tooltip="Jazz"/>
</asp:menuitem>
<asp:menuitem navigateurl="Movies.aspx"
text="Movies"
tooltip="Movies">
<asp:menuitem navigateurl="Action.aspx"
text="Action"
tooltip="Action"/>
<asp:menuitem navigateurl="Drama.aspx"
text="Drama"
tooltip="Drama"/>
<asp:menuitem navigateurl="Musical.aspx"
text="Musical"
tooltip="Musical"/>
</asp:menuitem>
</asp:menuitem>
</items>
</asp:menu>
</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>Menu DynamicBottomSeparatorImageUrl Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu DynamicBottomSeparatorImageUrl Example</h3>
<asp:menu id="NavigationMenu"
dynamicbottomseparatorimageurl="Images\Separator.jpg"
staticdisplaylevels="1"
orientation="Vertical"
runat="server">
<items>
<asp:menuitem navigateurl="Home.aspx"
text="Home"
tooltip="Home">
<asp:menuitem navigateurl="Music.aspx"
text="Music"
tooltip="Music">
<asp:menuitem navigateurl="Classical.aspx"
text="Classical"
tooltip="Classical"/>
<asp:menuitem navigateurl="Rock.aspx"
text="Rock"
tooltip="Rock"/>
<asp:menuitem navigateurl="Jazz.aspx"
text="Jazz"
tooltip="Jazz"/>
</asp:menuitem>
<asp:menuitem navigateurl="Movies.aspx"
text="Movies"
tooltip="Movies">
<asp:menuitem navigateurl="Action.aspx"
text="Action"
tooltip="Action"/>
<asp:menuitem navigateurl="Drama.aspx"
text="Drama"
tooltip="Drama"/>
<asp:menuitem navigateurl="Musical.aspx"
text="Musical"
tooltip="Musical"/>
</asp:menuitem>
</asp:menuitem>
</items>
</asp:menu>
</form>
</body>
</html>
備註
使用該 DynamicBottomSeparatorImageUrl 屬性指定一張可選的自訂圖片,顯示在每個動態選單項目的底部。 此影像作為選單項目的分隔符,通常為一行的影像。
備註
你也可以透過設定 DynamicTopSeparatorImageUrl 屬性,在每個動態選單項目的頂端顯示分隔器圖片。