Getting Started

NuGet Installation

The most straightforward way to add the Navigation framework to a new or existing ASP.NET Web Site or Application is to install it using NuGet by running the command Install-Package Navigation from within the Package Manager Console.

Manual Installation

If NuGet is unavailable (prior to VS 2010) the set up can be performed manually. The first stage of this manual set up is to add a reference to the Navigation.dll, which can be downloaded from http://navigation.codeplex.com/. After (unblocking and) unzipping the download the Navigation.dll should be obtained from the folder (beneath the bin folder) that corresponds to the version of .NET in use.

The next stage requires the registration of the StateAdapter class as an adapter for the Page control. The steps to follow are:

  1. Add an App_Browsers folder – right click the Web Project and select Add ASP.NET Folder -> App_Browsers
  2. Add a .browser file to the App_Browsers folder – right click the App_Browsers folder and select Add New Item, select Browser File and give it a name
  3. Configure the StateAdapter class as the Page’s control adapter – paste the configuration below into the .browser file
<browsers>
	<browser refID="Default">
		<controlAdapters>
			<adapter controlType="System.Web.UI.Page" adapterType="Navigation.StateAdapter, Navigation" />
		</controlAdapters>
	</browser>
</browsers>
The final stage of the manual set up is to create a StateInfo.config file, which will be used in the next section to hold the details of the pages and navigation between these pages:

  1. Add a new Text File called StateInfo.config file to the Web Project
  2. Point the Navigation framework at this file by adding the configuration below into the Web.config file
<configuration>
	<configSections>
		<sectionGroup name="Navigation">
			<section name="StateInfo" type="Navigation.StateInfoSectionHandler, Navigation"/>
	</configSections>
	<!-- other config elided -->
	<Navigation>
		<StateInfo configSource="StateInfo.config"/>
	</Navigation>
</configuration>
There is a small difference between the NuGet and manual installations which will be covered in the Navigation Hyperlink and Data Expression section.

Sample Web Site

Create a new Web Application project called NavigationSample, by selecting File -> New -> Project and the ASP.NET Empty Web Application option. Set it up to start using the Navigation framework by running the command Install-Package Navigation from within the Package Manager Console.

Last edited Aug 4, 2013 at 6:15 PM by GrahamMendick, version 6