A newer version of this page is available. Switch to the current version.

NavBarGroup.Text Property

Gets or sets the group's caption (the text content of the group's header).

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll


public string Text { get; set; }
Public Property Text As String

Property Value

Type Default Description


A string value that specifies the group's caption text.


Use the Text property to specify the group's caption text which is displayed within the group's header. The position of the text within the group's header is specified by the AppearanceStyleBase.HorizontalAlign and AppearanceStyleBase.VerticalAlign properties available via the group's NavBarGroup.HeaderStyle property.

If the NavBarGroup.NavigateUrl property of a group is assigned, the caption text set by the Text property servers as a link. It's underlined and a click on it navigates the application to the location specified by the NavBarGroup.NavigateUrl property.


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxNavBar" tagprefix="dxnb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxNavBar;

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e){
        NavBarGroup group1 = new NavBarGroup();
        group1.Text = "Help";
        NavBarItem item1 = new NavBarItem("Search");
        NavBarItem item2 = new NavBarItem("FAQ", "faq", "~/Images/faq.gif", "Faq.aspx", "_blanc");
        NavBarItem item3 = new NavBarItem("Forum", "forum", "~/Images/Forum.gif");
        item3.NavigateUrl = "~/Forum/Default.aspx";
        item3.Target = "_blanc";      


        item1.Template = new MyTemplate();

    public class MyTemplate : ITemplate {
        void ITemplate.InstantiateIn(Control container) {
            ASPxTextBox MyTextBox = new ASPxTextBox();
            MyTextBox.Text = "";
            ASPxButton SearchButton = new ASPxButton();
            SearchButton.Text = "Search..";
            SearchButton.AutoPostBack = false;


<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">

        <dxnb:ASPxNavBar ID="ASPxNavBar1" runat="server">

See Also