![]() Prior to ASP.NET version 2.0, page developers often placed common markup in User Controls and then added these User Controls to each and every page. And to top it off, this approach makes replacing the existing site-wide appearance with a new one a real pain because every single page in the site must be edited in order to use the new look and feel. ![]() Such copying and pasting operations are ripe for error as you may accidentally copy only a subset of the shared markup into a new page. For starters, every time a new page is created, you must remember to copy and paste the shared content into the page. A naive approach is to simply copy and paste the common layout markup into all web pages, but this approach has a number of downsides. There are a variety of techniques for creating web pages with a consistent look and feel. For example, while each tutorial or forum post on have their own unique content, each of these pages also render a series of common elements that display the top-level section links: Home, Get Started, Learn, and so on. Let's get started! Understanding How Master Pages Workīuilding a website with a consistent site-wide page layout requires that each web page emit common formatting markup in addition to its custom content. We discuss how master pages work, look at creating a master page and associated content pages using Visual Web Developer, and see how changes to a master page are immediately reflected in its content pages. This inaugural tutorial starts with a look at master page basics. Each tutorial is available in C# and Visual Basic versions and includes a download of the complete code used. These tutorials are geared to be concise and provide step-by-step instructions with plenty of screen shots to walk you through the process visually.
0 Comments
Leave a Reply. |