Page Inspector in Visual Studio

Another very good feature that has been added into Visual Studio is the Visual Studio Page Inspector for web applications. This feature allows us to inspect the HTML markup of the page within Visual Studio, like we use the tools in the web browser. So let's explain it.

Create a new web project and select the Default.aspx page. Right-click on the page and select the option.

Create a new web project

This opens the page in a view like we have in our browser.

browser

Select the HTML tab and hover over any element from the markup and the corresponding element is highlighted in the Page Inspector window. The corresponding style/CSS is also highlighted on the right side.

HTML tab

Select the Inspect tab. Now hover over any content in the page and its corresponding HTML in the page is displayed. This could even be the master page.

home page

Helpful, isn't it? And all that without running the application. Happy coding!

Up Next
    Ebook Download
    View all
    Learn
    View all