NavBarItem.Target Property

Gets or sets the window or frame at which to target the contents of the URL associated with the current item.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll


public string Target { get; set; }

Property Value

Type Default Description


A string which identifies the window or frame at which to target the URL content.


When an item is clicked and its NavBarItem.NavigateUrl is defined, the client web browser navigates to the specified URL and displays it in the window or frame as specified by the Target property. The available values of the property are listed in the table below.

Member Description
name The name of the target window or frame.
_blank Load the linked document into a new blank window. This window is not named.
_parent Load the linked document into the immediate parent of the document the link is in.
_search Load the linked document into the browser search pane.
_self Load the linked document into the window in which the link was clicked (the active window).
_top Load the linked document into the topmost window.


This example demonstrates how to modify the ASPxNavBar‘s item content.

<%@ 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("Help", "HelpGroup1");
        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.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