Sunday, March 9, 2014

Navigation Controls

Here you will find two videos showing a very simple way of creating a web site with a hierarchy of pages. Then you will use Mater Pages to make all pages look from the same site and place navigation controls on this master page so that you can go to any page from any page. The videos show a different view of creating web sites with navigation controls, which might explain their essence better...

ASP.NET has many very useful and easy to use server controls with navigation being one of the easily solvable problem. The whole trick is in the creation of a special file Web.sitemap where you describe the structure of your site, how pages are being grouped and what hierarchies they form. Then a special element: SiteMapDataSource control connects various navigation controls to thee site description in Web.sitemap. You just have to pick a navigation control of interest and drop it onto the proper section (usually it is a Sidebar section of the master page. And... this is it!

G2 can just follow the video, if it seems simpler, modify some of its elements and, mostly important, creating pages with their own HTML content (text, art, etc.). If you want to use a lot of server controls - you will need a form, and at the current level of your knowledge it might be easier to use some of the pages without the coverage of the master page but linked by html links from other pages. There you can have all controls you want.
Part1. Here you will see how to create a master page with the side bar ready for placing navigation controls on it.
Part 2. This part shows how to create Web.sitemap description and connect navigation controls to it by using SiteMapDataSource control


  
 

No comments:

Post a Comment