Showing posts with label ASP.Net 2.0 Master Page. Show all posts
Showing posts with label ASP.Net 2.0 Master Page. Show all posts

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

ASP.Net Master Page for Consistant look and feel for websites

In this blog we will take up the Master page.
Start a new Asp.Net 2.0 project.
Go to solution explorer and delete Default.aspx. Go to Web Site menu select Master Page.
Master page resembles an ordinary asp.net web page except that it contains a content place holder.

Go to the design view.





















































In the case of my master page I am going to give a consitent header and footer. So keeping the content place holder intact I added the header and footer.





Now add a new Asp.Net page. There will be an option called select maste page. Check that option and click Add.









































The Select Master Page dialog will appear as shown in the exibit.




















Select the master page and Click OK.

You will get the page as shown in the exibit. You can type the page specific data inside the content place holder.






Like wise you can add rest of the Asp.Net pages and select the master page for consistent look and feel.


Related Blogs

Asp.Net 2.0 Master Page and TreeView
Themes in Asp .Net
shalvinpd.blogspot.com