I can not find options for selecting the main page or location code in a separate file in VS2012

I installed VS 2012 on my working PC, and for my life, when I go to add a new web form, I cannot see or cannot find 2 options for Select Master Page or Place code in separate file .

Any ideas on how I can find them?

+4
source share
2 answers

Do you have to have a web form with a homepage in the add items?

Placing code in a separate file is another concept called code-behind . You will have an ASPX file and a cs / vb file that handles events.

eg

Default.aspx
Default.aspx.cs

enter image description here

EDIT : based on the comment.

You may be using the Web Site on your laptop, but the Web Application is working. See Web Application Projects v Website Projects .

Take a look at the ASP.NET website or ASP.NET web application? , it can also help in deciding what to use. As a rule, I always use a web application.

You can use VS to convert from a website to a web application , but AFAIK, you cannot do it the other way round unless you create a new project and copy it in appropriate parts, which can be a lot of work depending on size site.

+3
source

I just tricked it in the last hour. I found that the "old" method of using the "Add a Web Page Using a Wizard" menu option (or similar) has disappeared and replaced with a "Content Page". When you select this, you are given the opportunity to select the main page.

By the way, I don’t have the opportunity to start a website project, and maybe I don’t see this either.

+9
source

All Articles