Skip to main content
Tab

ASPxTabControl.NavigateUrlFormatString Property

Gets or sets the pattern used to format tab navigate URLs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

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

Property Value

Type Default Description
String "{0}"

A string value that represents the format pattern.

Remarks

Note

Display values can be formatted using the standard formatting mechanism. It allows you to format values using standard format patterns. Format specifiers for composing the format pattern are described in the Numeric Format Strings and Date and Time Format Strings topics.

Example

This example illustrates how the ASPxTabControl can be bound to the XmlDataSource component that obtains data from an xml file. The ASPxTabControl implements specific properties that point to the data fields containing the necessary data. These are the ASPxTabControl.NameField, ASPxTabControl.NavigateUrlField, ASPxTabControl.TabImageUrlField, ASPxTabControl.ActiveTabImageUrlField, ASPxTabControl.TextField and ASPxTabControl.ToolTipField properties. If these properties are not defined, the ASPxTabControl is able to automatically bind to data fields whose names coincide with the property names of a Tab object (such as the TabBase.Name, Tab.NavigateUrl, TabBase.TabImage, TabBase.ActiveTabImage, TabBase.Text and TabBase.ToolTip).

In this demo, navigate locations for tabs are composed by formatting values of the ‘id’ data field in a specific manner. The ‘id’ data field is pointed by the ASPxTabControl.NavigateUrlField property, and a format string is defined via the ASPxTabControl.NavigateUrlFormatString property.

<dx:ASPxTabControl ID="ASPxTabControl1" runat="server" 
    DataSourceID="XmlDataSource1" NavigateUrlField="id" NavigateUrlFormatString="?id={0}">
</dx:ASPxTabControl>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" 
    DataFile="~/App_Data/TabControlData.xml" XPath="//product">
</asp:XmlDataSource>
See Also