Visual Studio 2012: How to create a web form using Master Page
Asked Answered
P

3

9

Hi I am fairly new to programming and C# in particular. I am working from a text book "Cloud Database Development and Management" by Lee Chao and having an issue creating a web form using master page in chapter 9.

I have created an ASP.NET Web form as well as a master page. The next step is to create a "Web form using Master page" but the option as shown in the book is not available to me. I have done research using google as well as this site with no luck. One common suggestion is to create a "Web Form" and there should be an option for 'use master page' after web form created but I do not see that option either. Any suggestions or advice on how to create a web form using the master page would be greatly appreciated!

Thanks

Paddy answered 9/11, 2013 at 15:41 Comment(0)
R
24

That specific new item object has been renamed to "ContentPage".

Rensselaerite answered 3/12, 2013 at 17:35 Comment(2)
Shame on Microsoft for not updating the tutorial! msdn.microsoft.com/en-us/library/fft2ye18%28v=vs.90%29.aspxDiathesis
and it place code in separate code by default + asking about the masterpage selection in next stepCorrales
J
0

If you do not see the option whilst creating the page, just add it once it's created in the source of the ASPX, like this (in the declarations in the top of the ASPXpage, a.k.a.: the Web Form):

<%@ Page MasterPageFile="myMaster.master" %>

This way the ASPX looks for a MasterPage named myMaster.master (in this example).

Jolynnjon answered 9/11, 2013 at 15:45 Comment(0)
M
0

When you click the Web Form option, the must be a check box right above the Add button. Select master page. If you check that box, then you can select the master page.enter image description here

Microbicide answered 5/6, 2015 at 16:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.