Skip to main content
Tab

ASPxTabControl.TabImageUrlField Property

Gets or sets the name of a data field (or an xml element’s attribute) which provides URLs for images displayed within tabs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public string TabImageUrlField { get; set; }

Property Value

Type Default Description
String String.Empty

A string value that specifies the name of the required data source field.

Remarks

The TabImageUrlField property is in effect if the ASPxTabControl control is bound to a data source (via the ASPxDataWebControlBase.DataSourceID or ASPxDataWebControlBase.DataSource property).

Use the TabImageUrlField property to specify the bound data source’s data field (or an xml element’s attribute) which stores locations of images that should be displayed within tabs in their inactive state. The TabImageUrlField property maps the TabImage.Url properties of TabBase objects to the specified data field’s values.

If the TabImageUrlField property of a data bound ASPxTabControl control is not defined, the control can automatically obtain tab image locations from a data field which is named “TabImageUrl”. You can also handle the ASPxTabControl.TabDataBound event to manipulate a tab’s settings as required.

Example

This sample demonstrates how to bind the ASPxTabControl to an XML data file. XML data are retrieved from the file via an XmlDataSource component whose XPath property is specifically defined. The XmlDataSource is used as a data source for the ASPxTabControl.Based on the source data, the ASPxTabControl populates its Tabs collection with automatically created Tab objects. Tab object characteristics (such as text, image, navigate location, tooltip text, etc) are obtained from the data source's data fields (node attributes).In this demo, the required data fields (node attributes) from which to retrieve tab data are indicated using the following specific data-related properties of the ASPxTabControl:ActiveTabImageUrlField,NameField,NavigateUrlField,TabImageUrlField, TextField and ToolTipField.

For more information about these properties see:

<dx:ASPxTabControl ID="ASPxTabControl1" runat="server" 
    ActiveTabImageUrlField="ActiveTabImage" DataSourceID="XmlDataSource1" 
    NameField="ID" NavigateUrlField="Link" TabImageUrlField="Image" 
    TextField="Caption" ToolTipField="Hint">
</dx:ASPxTabControl>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" 
    DataFile="~/App_Data/TabControlDataSource_manual.xml" XPath="platforms/*">
</asp:XmlDataSource>
<?xml version="1.0" encoding="utf-8" ?>
<platforms>
    <platform ID="WinForms" Link="javascript: void(0);" Image="~/Images/WinForms_ini.png" ActiveTabImage="~/Images/WinForms_Active.png" Caption="WinForms Controls" Hint="WinForms Controls and Libraries"></platform>
    <platform ID="ASP" Link="javascript: void(1);" Image="~/Images/ASP_ini.png" ActiveTabImage="~/Images/ASP_Active.png" Caption="ASP.NET Controls" Hint="ASP.NET Controls and Libraries"></platform>
    <platform ID="VCL" Link="http://devexpress.com/Products/VCL/" Image="~/Images/VCL_ini.png" ActiveTabImage="~/Images/VCL_Active.png" Caption="Delphi VCL Controls" Hint="Delphi and C++ Builder Controls"></platform>
</platforms>
See Also