Thursday, February 28, 2008

Asp.Net 2.0 Master Page and TreeView

Lets continue out discussion on Master Page. In this blow we will take up TreeView also which can be used for having a consistent navigation option.

It is possible to work with TreeView by going to properties window but in this blog we are going to take up working with Site Map.

Start a new asp.net project. Delete the Default.aspx page.

Add a Site map by going to Web Site Menu option.

Web.sitemap is an xml file.












Add a Master Page.

This time I am making the master page a bit complex as shown in the exhibit.













Click on the smart tag of tree view and go to choose data source and select new data source as show in the figure.













Select Sitemap and click ok.

Now add Default.aspx, Categories.aspx and Products.aspx also make sure you check Select Master Page as discussed in the previous blog http://shalvinpd.blogspot.com/2008/02/aspnet-master-page-for-consistant-look.html

Now you have a consistence look and feel and well as navigation option for your site.

Happy Programming
shalvin@gmail.com

No comments:

Post a Comment