$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Data Binding NavigationBar to a DataBase in ASP.NET
Home > How to > NavigationBar Binding Database Data
The PerNavigationBar control owns the ability to bind navigationbar to various data types via data binding method, including XML data file, table-based DataSource components (like sql data base), hierarchical DataSource components (like DataSet) and object-based Data Source(like ObjectDataSource). And in this tutorial, we will put the focus on how to bind navigationbar to these table-based DataSource components at design time in asp.net web application.

How to Bind NavigationBar to DataBase

In this section, we will guide users to finish the task of data binding NavigatinBar to a database in ASP.NET developing platform step by step. And here we mainly take the data binding of NavigationBar to sql database as an example. The task of data binding navigationbar to other table based DataSource components, like AccessDataSource, works in the similar way.
  1. Click the PerNavigationBar Smart Tag "Choose Data Source" | "<New Data Source>".
  2. From the "Choose a data source type" page of the wizard select "Database" and click "OK".
  3. Click New Connection in the Configure Data Source page.
  4. In the Add Connection Page, find the field Data source and select the Microsoft SQL Server Database File via Change button. Then select the Northwind database file via button Browse. Click ok, then select Next and click Finish.
  5. Add following C# code to bind the NavigationBar to selected data base.
PerNavigationBar1.DataFieldID = "EmployeeID";
PerNavigationBar1.DataFieldParentID = "ReportsTo";
PerNavigationBar1.DataTextField = "FirstName";
Note: In order to let you run the PerNavigationBar control successfully in your web application, please make sure that your ASP.NET web application has installed NET Framework 3.5 or above versions and that you have installed all the necessary dlls from our ASP.NET AJAX SDK into your ASP.NET web application.

Related NavigationBar Data Binding Tutorials

ASP.NET AJAX UI Controls