Download presentation
Presentation is loading. Please wait.
Published byCatherine Garrison Modified over 9 years ago
1
1 Designing & Developing Web- Based Solutions in ASP.NET Week 3 Website Navigation & Resources
2
Today’s Agenda Web Site Navigation MultiView-Wizard SiteMaps TreeView-Menu Controls SiteMapPath Control Resources Text Localization Graphic & Other Asset Localization Lab: Finish MasterPage & Populate Site with pages Website Navigation Localized Text Strings Designing & Developing Web-Based Solutions in ASP.NET2
3
MultiView & Wizard Controls Purpose Single web page -- Multiple views Lists (www.vistaprint.com)www.vistaprint.com Surveys Alternate views of data (Raw text, chart, image, …) Good Single page keeps navigation simple Bad Data / State can make for large page if sloppy. Designing & Developing Web-Based Solutions in ASP.NET3
4
MultiView vs. Wizard Wizard has more features State restrictions Extra navigation controls Submit control Submit each step OR Submit on final Designing & Developing Web-Based Solutions in ASP.NET4
5
Site Maps Purpose Define page Heirarchy Define page URL, Friendly Name, Tooltip Description Use in a Navigation control Types Files:.sitemap Code/DB: via SiteMapProvider Designing & Developing Web-Based Solutions in ASP.NET5
6
Default.sitemap file Designing & Developing Web-Based Solutions in ASP.NET6
7
Nested Site Map files Can restrict menu display to child sitemaps Designing & Developing Web-Based Solutions in ASP.NET7
8
Site Map Restrictions URL’s must be unique Work Arounds Use a custom SiteMapProvider (more work) Add dummy query strings to identical URLs (BEST) URL=“~\About.aspx?id=1” URL=“~\About.aspx?id=2” URL Mapping: Alias URLs in web.config NOTE: stops the bogus query string from appearing Designing & Developing Web-Based Solutions in ASP.NET8
9
Security Trimming Auto enable/disable private pages in.sitemap web.config <add name=“SecureSiteMapProvider” siteMapFile=“Default.sitemap” securityTrimmingEnabled=“true”/> Turn OFF security Default.sitemap // All allowed Designing & Developing Web-Based Solutions in ASP.NET9
10
SiteMapDataSource Provides the link: References a.sitemap Hooked to one or more Navigation controllers Control Hierarchy Visibility SiteMapDataSource.ShowStartingNode SiteMapDataSource.StartFromCurrentNode SiteMapDataSource.StartingNodeOffset Designing & Developing Web-Based Solutions in ASP.NET10
11
Menu &/|| Treeview Both highly configurable Orientation: horizontal/vertical Colors, images, fonts Dummy vs. clickable nodes Spacing Styles for different levels of the hierarchy Add the SiteMapDataSource to the property Can have multiple menus & SiteMapDataSrc’s Designing & Developing Web-Based Solutions in ASP.NET11
12
SiteMapPath Purpose: Displays the current pages hierarchy. “You are HERE” Can allow user to select a parent page Can set styles, clickable links, tooltips, … Home > About > Contact Us > Directions ParentLevelsDisplayed = 1 Contact Us > Directions Does NOT use siteMapDataSource. Designing & Developing Web-Based Solutions in ASP.NET12
13
Localization – Resource files App_LocalResources Page Specific About.aspx About.aspx.resx About.aspx About.aspx.fr.resx About.aspx About.aspx.sp.resx App_GlobalResources Site wide Resources.resx Content ID=Text Designing & Developing Web-Based Solutions in ASP.NET13
14
Localization - Code String.Format() // localized by default “0:c” // currency Additional special symbols localized (date/time,…) DateTime.ToString() // localized by default Designing & Developing Web-Based Solutions in ASP.NET14
15
Homework Readings Chapter 15 – User Controls Project Menu, BreadCrumb, Localization, Wizard… Designing & Developing Web-Based Solutions in ASP.NET15
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.