Using the Page Inspector feature

Page Inspector is a tool that renders our pages in our Visual Studio 2012 IDE and lets us examine the source code and its output. It is great to determine which piece of code has produced a specific HTML markup code.

Getting ready

In order to use this recipe you should have Visual Studio 2012.

How to do it...

In this section we are going to see how to use the Page Inspector to inspect a page along with its styles.

  1. Open our previous ASP.NET application.
  2. Right-click on the Books.aspx page and select the View in Page Inspector option.
  3. Once the Page Inspector panel opens, click on the Inspect button at the bottom of the rendered page and click on the Categories selector. The bottom section should showcase the rendered HTML; we should see the applied styles on our left and the ASP.NET code that generates the selected element on our right.
    How to do it...

How it works...

The page inspector is an outstanding feature to discover where a concrete style is being applied or what is provoking a change in our interface. It allows us to see the source HTML, the styles, and the final generated code as well as the final rendering, hence becoming a really useful tool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset