System.Web.UI.WebControls.MenuItemBinding.ImageUrlField Property

Gets or sets the name of the field from the data source to bind to the MenuItem.ImageUrl property of a System.Web.UI.WebControls.MenuItem object to which the System.Web.UI.WebControls.MenuItemBinding object is applied.

Syntax

[System.ComponentModel.TypeConverter("System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.DefaultValue("")]
public string ImageUrlField { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the System.Web.UI.WebControls.Menu control is bound to a data source, use the MenuItemBinding.ImageUrlField property to specify the name of the field to bind to the MenuItem.ImageUrl property of a System.Web.UI.WebControls.MenuItem object. When rendered, the MenuItem.ImageUrl property of each menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied contains the corresponding value from the field. The image is displayed next to a menu item's text and can be in any file format (.jpg, .gif, .bmp, and so on), as long as the client's browser supports that format.

Note:

You can override the image for an individual menu item by setting its MenuItem.ImageUrl property directly.

If the data source contains multiple tables or attributes, you must first establish the binding criteria by setting the MenuItemBinding.Depth property, the MenuItemBinding.DataMember property, or both.

Instead of using this property to bind the MenuItem.ImageUrl property of a System.Web.UI.WebControls.MenuItem object to a field, you can also bind it to a static value by setting the MenuItemBinding.ImageUrl property. This allows you to display the same image in each menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied.

Note:

If the MenuItemBinding.ImageUrl and MenuItemBinding.ImageUrlField properties are both set, the MenuItemBinding.ImageUrlField property takes precedence.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0