Skip to Content
Beginning ASP.NET 3.5: In C# and VB
book

Beginning ASP.NET 3.5: In C# and VB

by Imar Spaanjaars
March 2008
Intermediate to advanced content levelIntermediate to advanced
766 pages
21h 15m
English
Wrox
Content preview from Beginning ASP.NET 3.5: In C# and VB

6.5. Practical Tips on Creating Consistent Pages

The following list provides some practical tips on creating consistent pages.

  • When you create a new web site, always start by adding a master page that you base all other pages on. Even if you think you have a site with only a few pages, a master page will help you ensure a consistent look across the entire site. Adding a master page at a later stage to the site means making a lot of manual changes to the existing pages, so adding one from the beginning saves you from having to do a lot of work later.

  • As soon as you find yourself adding styling information to complex controls like the TreeView and Menu (discussed in the next chapter) or data-aware controls like the GridView (discussed in Chapter 12), consider creating a skin for them. The fact that you can control the layout of all similar controls from a single location makes it a lot easier to update your site. If you want to override the layout for a few controls, you can always use named skins with a SkinID or disable the skin entirely by setting EnableTheming to False.

  • When creating skins or setting style properties directly on a control, consider using the CssClass property instead, and then moving all styling-related properties to the CSS for the site or theme. This decreases the page's size and makes it easier to make changes to the layout afterwards.

  • The Export Template feature of Visual Web Developer is a great time saver. You can use it not only to create a template for ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ASP.NET 4: in C# and VB

Beginning ASP.NET 4: in C# and VB

Imar Spaanjaars
Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Bill Evjen, Scott Hanselman, Devin Rader

Publisher Resources

ISBN: 9780470187593Purchase book