Skip to main content
A newer version of this page is available. .
Tab

ASPxTabControl.NavigateUrlFormatString Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

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.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" 
Inherits="_Default" %>

<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTabControl" tagprefix="dxtc" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dxw" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxCallbackPanel" tagprefix="dxcp" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dxp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <dxtc:ASPxTabControl ID="ASPxTabControl1" runat="server" 
            DataSourceID="XmlDataSource1" NavigateUrlField="id" NavigateUrlFormatString="?id={0}">
        </dxtc:ASPxTabControl>
        <asp:XmlDataSource ID="XmlDataSource1" runat="server" 
            DataFile="~/App_Data/TabControlData.xml" XPath="//product">
        </asp:XmlDataSource>
    </div>
    </form>
</body>
</html>
See Also