Menu.StaticItemFormatString Property

Gets or sets additional text shown with all menu items that are statically displayed.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
property String^ StaticItemFormatString {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_StaticItemFormatString ()

/** @property */
public void set_StaticItemFormatString (String value)

public function get StaticItemFormatString () : String

public function set StaticItemFormatString (value : String)

Not applicable.

Property Value

The additional text or characters that appear with all menu items. The default value for this property is "{0}."

This property can be used to insert text to format static menu items in a menu. This is particularly useful for mobile devices. The Menu control supports templates for the display of static and dynamic menu items, but templates are ignored on mobile devices. This property allows you to add characters or text and to apply formatting to menu items for both mobile and desktop devices without using a template.

NoteNote:

To achieve consistent formatting when you use this property, you should also set the DynamicItemFormatString property if you want the formatting to be identical between the static and dynamic menu items.

If both template formatting and this property are applied, the template formatting is ignored for mobile devices.

The following code example demonstrates how to use the StaticItemFormatString and DynamicItemFormatString properties to add text to each menu item.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: