Reputation: 33078
I'm reading a book that recommends clicking a check box that says "Place code in separate file" when adding a new Web Form to an existing ASP.NET project. The book is using Visual Studio 2005 and there is a check box for "Place code in separate file" when you open the "Add New Item" dialog.
I am using Visual Studio 2008 and I do not see the "Place code in separate file" checkbox when I try to add a new item. Is there something I need to do to enable this? Was this functionality no longer possible/important in VS 2008?
Upvotes: 2
Views: 4561
Reputation: 22857
I believe in 2008 it is the default behaviour.
If you add an apsx file it will add the aspx.cs without any interaction from yourself.
Upvotes: 3
Reputation: 26956
This option depends on the type of project you are building:
/App_Code
folder, the code is not compiled into a .dll in the /bin
folder) then you will have the option (ticked by default in VS2008/2010) to "Place code in separate file", and also "Select master page"./App_Code
folder, compiles all .cs/.vb files into one .dll in the /bin
folder) then you don't have the option to not create a separate code file, and when you add a new item it's either a "Web Form" or a "Web Form using Master Page".Upvotes: 2