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 Value

Type: System::String^

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.

System_CAPS_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.

.NET Framework
Available since 2.0
Return to top
Show: