Bootstrap FreeKB - Visual Studio - Master Page
Visual Studio - Master Page

Updated:   |  Visual Studio articles

To create a master page in Visual Studio:

  1. In Visual Studio, on the right (solution explorer), hover over the name of our site, right-click and select Add > New Folder
  2. Name the new folder MasterPages
  3. With the MasterPages folder highlighted press Ctrl + Shift + A (or right-click and select Add > New Item)
  4. In the Add New Item pop-up box, select Web Forms Master Page and select Add. Name this main.master.
  5. Switch to design view and type Master Page

 

To create a page that uses the main.master page:

  1. In solution explorer, highlight the name of your site and press Ctrl + Shift + A (or right-click and select Add -> New Item)
  2. In the Add New Item pop-up box, select Web Forms with Master Page and select Add. Name this default.aspx.
  3. When prompted to select our a master page, select main.master
  4. Switch to design view and type Default Page

You can now publish your site, and your default.aspx page should display both Master Page and Default Page.

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter bb41cb in the box below so that we can be sure you are a human.