This last part of the chapter on Web Standards in Dreamweaver shows you how to create a layout with a banner at the top of the page and a navigation menu on the left side. (From the book ASP.NET Web Development with Macromedia Dreamweaver MX 2004, by Costas Hadjisotiriou, 2004, Apress, ISBN: 1590593480.)
Web Standards in Dreamweaver Part 3 - Working with Dynamic Data (Page 11 of 12 )
Later in this book, you will immerse yourself in developing dynamic ASP.NET sites in Dreamweaver MX 2004. Developing with valid XHTML or HTML should make your life easier when incorporating dynamic data into your page. When data is being pulled from a database, small errors such as unclosed tags and badly nested elements can wreak havoc across your site and become difficult to debug, so starting with a solid framework as you design your layout will save time later on.
A combination of valid (X)HTML and CSS is ideal for a dynamic site, especially those sites that allow users to add information (such as content management systems or client-updateable news pages) because your style-sheets ensure that consistency is maintained across your site.
What to Watch Out For
There are some issues to watch out for when working with dynamic pages.
When selecting an area to use as a repeat region (a dynamic, repeating block of code pulled from a database), ensure that you select the entire block of code that you want to be repeated, and that the tags are properly closed and nested when the page is viewed in a web browser.
When creating areas of your page that will be displayed conditionally, ensure that all tags are closed correctly when the page is loaded under each possible condition.
If you are creating pages to which users or authors will add content via an administration section, take extra care in the design of the application so that the authors do not add anything invalid, or add HTML markup where you are working in XHTML.
Validating Dynamic Pages
Dynamic pages should be validated with the online validator at the W3C. If the pages include conditional regions, validate each possible way that the page can be displayed if at all possible. Your server-side code will not cause any validation problems with the validator because by the time it has been parsed by the server, the validator sees only the (X)HTML generated from the server-side code.
If you are maintaining a dynamic site, pages that are frequently modified should be validated occasionally in order to check that you are effectively counteracting invalid items.
This chapter is from ASP.NET Web Development with Macromedia Dreamweaver MX 2004, by Costas Hadjisotiriou (Apress, 2004, ISBN: 1590593480). Check it out at your favorite bookstore today.