Source View is the default view when you open a page. It shows you the raw HTML and other
markup for the page, and is very useful if you want to tweak the contents of a page and you have a
good idea of what you want to change and where. As I explained in the previous chapter, I use the
term Markup View rather than Source View to refer to the markup of ASPX and HTML pages.
The Design button enables you to switch the Document Window into Design View, which gives
you an idea of how the page will end up. When in Design View, you can use the Visual Aids and
Formatting Marks submenus from the main View menu to control visual markers like line breaks,
borders, and spaces. Both submenus offer a menu item called Show that enables you to turn all
the visual aids on or off at once. Turning both off is useful if you want to have an idea of how the
page ends up in the browser. You should, however, use Design View only to get an idea of how the
page will end up. Although VS has a great rendering engine that renders the page in Design View
pretty well, you should always check your pages in different browsers as well, because what you
see in VS is the markup for the page before it gets processed. Server controls on the page may emit
HTML that changes the look of the page in the browser. Therefore, it’s recommended to view the
page in the browser as often as possible so you can check if it’s going to look the way you want it.
It’s also recommended to test your site in as many different browsers as you can get your hands on,
because there may be small differences between them in the way they render a web page. The Planet
Wrox website has been developed and tested against recent versions of Microsoft Internet Explorer,
Firefox, Google Chrome, Safari, and Opera. You’ll see screenshots of these browsers at various
places in the book.
The Split button enables you to look at Design View and Markup View at the same time, as you can
see in Figure 2-10.
Split View is great if you want to see the code that VS generates when you add controls to the Design
View of your page. The other way around is very useful too: When you make changes to the markup
of the page in Markup View, you can see how it ends up in Design View. Sometimes Design View
becomes out of sync with Markup View. If that’s the case, a message appears at the top of Design
View. Simply clicking the message or saving the entire page is enough to update the Design window