Version

Setting NavigateURL and Target Properties

You can use WebExplorerBar™ as a navigational layout for your pages. The control’s ExplorerBarGroup and ExplorerBarItem objects have a NavigateUrl property and a Target property that you can use to set the URL of your page and the target to load the page, respectively.

The following code shows you how to use WebExplorerBar’s items as navigational links to web pages and load the pages in an iframe.

In HTML:

<ig:WebExplorerBar ID="WebExplorerBar1" runat="server" Width="300px" BehaveMode="AnyExpandable">
    <Groups>
        <ig:ExplorerBarGroup Text="Favorites" ImageUrl="~/Icons/FolderFavorite.png">
            <Items>
                <ig:ExplorerBarItem Text="Infragistics" NavigateUrl="http://www.infragistics.com" Target="iframe1" ImageUrl="~/Icons/Favorites.png" />
                <ig:ExplorerBarItem Text="MSDN" NavigateUrl="http://www.msdn.com" Target="iframe1" ImageUrl="~/Icons/Favorites.png" />
            </Items>
        </ig:ExplorerBarGroup>
        <ig:ExplorerBarGroup Text="Searches" ImageUrl="~/Icons/FolderExplore.png">
            <Items>
                <ig:ExplorerBarItem Text="Google" NavigateUrl="http://www.google.com" Target="iframe1" ImageUrl="~/Icons/Search.png" />
                <ig:ExplorerBarItem Text="Yahoo" NavigateUrl="http://www.yahoo.com" Target="iframe1" ImageUrl="~/Icons/Search.png" />
            </Items>
        </ig:ExplorerBarGroup>
    </Groups>
</ig:WebExplorerBar>
<iframe id="frame1" name="iframe1" class="MainContent" width="550" height="500">
</iframe>

In Visual Basic:

' Group 1
Dim weg = New ExplorerBarGroup With {.Text = "Favorites", .ImageUrl = "~/Icons/FolderFavorite.png"}
Dim item = New ExplorerBarItem With {.Text = "Infragistics", .NavigateUrl = "http://www.infragistics.com", .Target = "iframe1", .ImageUrl = "~/Icons/Favorites.png" }
weg.Items.Add(item)
item = New ExplorerBarItem With {.Text = "MSDN", .NavigateUrl = "http://www.msdn.com", .Target = "iframe1", .ImageUrl = "~/Icons/Favorites.png"}
weg.Items.Add(item)
Me.WebExplorerBar1.Groups.Add(weg)
' Group 2
weg = New ExplorerBarGroup With {.Text = "Searches", .ImageUrl = "~/Icons/FolderExplore.png"}
item = New ExplorerBarItem With {.Text = "Google", .NavigateUrl = "http://www.google.com", .Target = "iframe1", .ImageUrl = "~/Icons/Search.png"}
weg.Items.Add(item)
item = New ExplorerBarItem With {.Text = "Yahoo", .NavigateUrl = "http://www.yahoo.com", .Target = "iframe1", .ImageUrl = "~/Icons/Search.png"}
weg.Items.Add(item)
Me.WebExplorerBar1.Groups.Add(weg)

In C#:

// Group 1
ExplorerBarGroup weg = new ExplorerBarGroup() { Text = "Favorites", ImageUrl = "~/Icons/FolderFavorite.png" };
ExplorerBarItem item = new ExplorerBarItem()
{
    Text = "Infragistics",
    NavigateUrl = "http://www.infragistics.com",
    Target = "iframe1",
    ImageUrl = "~/Icons/Favorites.png"
};
weg.Items.Add(item);
item = new ExplorerBarItem()
{
    Text = "MSDN",
    NavigateUrl = "http://www.msdn.com",
    Target = "iframe1",
    ImageUrl = "~/Icons/Favorites.png"
};
weg.Items.Add(item);
this.WebExplorerBar1.Groups.Add(weg);
// Group 2
weg = new ExplorerBarGroup() { Text = "Searches", ImageUrl = "~/Icons/FolderExplore.png" };
item = new ExplorerBarItem()
{
    Text = "Google",
    NavigateUrl = "http://www.google.com",
    Target = "iframe1",
    ImageUrl = "~/Icons/Search.png"
};
weg.Items.Add(item);
item = new ExplorerBarItem()
{
    Text = "Yahoo",
    NavigateUrl = "http://www.yahoo.com",
    Target = "iframe1",
    ImageUrl = "~/Icons/Search.png"
};
weg.Items.Add(item);
this.WebExplorerBar1.Groups.Add(weg);
WebExplorerBar SettingNavigateUrlandTargetProperties 01.png