Are those only available to ASP.NET MVC template?
Yes, but you could cheat. The way Visual Studio shows those shortcuts is by looking at the project type and if it sees that it is an ASP.NET MVC project it will make them available. But how does it know it is an ASP.NET MVC project? After all ASP.NET MVC is an ASP.NET project.
Open the .csproj
file and look for the <ProjectTypeGuids>
node of your ASP.NET MVC 4 project. You will see something like this:
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
Now open the .csproj
file of your regular ASP.NET project and simply add the {E3E379DF-F4C6-4180-9B81-6769533ABE47}
GUID as first item in the list (if you don't project does not even load). That's all. Now you will see the ASP.NET MVC specific context menus in your WebForms project.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…