Tuesday, December 27, 2016

Creating Websites with Visual Studio



The preceding article Creating Websites with Visual Studio  gave you a quick overview of creating a website in VS. You simply chose New Web Site from the File menu, selected a language, selected the standard ASP.NET Web Forms Site template, and clicked OK. However, there’s more to the New Web Site dialog box than you saw in the previous article. You may have noticed that you can choose among a number of different templates that enable you to create different kinds of sites. But before looking at the different templates on which you can base your new website, you need to know a little more about the different project types that are available in VS.
Different Project Types.
In Visual Studio 2013 you can choose between two types of projects for creating ASP.NET Web Forms websites: Web Application Projects and Web Site Projects.
Web Application Projects Web Application Projects make it easier for developers who work in teams or who need more control over the contents of the site and their compilation and deployment processes to build websites with VS. The whole website is managed as a project, with a single project file that keeps track of all the content of the website. In VS, you create a new Web Application Project through the File ➪ New Project dialog box. The Web category contains a single template — ASP.NET Web Application — that lets you create a web application that can contain various ASP.NET-related technologies such as Web Forms, ASP.NET MVC, and Web API. This is part of Microsoft’s “One ASP.NET” initiative that aims to bring the various web technologies closer together in Visual Studio. For more information about these technologies, visit www.asp.net and click the Learn menu item.
Note:
For more information on One ASP.NET, and to learn more advancedtechniques, consult Professional ASP.NET 4.5 (Wrox; ISBN: 978-1-118-31182-0).
Web Site Projects Web Site Projects represent a project in VS for a website. You create a new Web Site Project by choosing File ➪ New Web Site or File ➪ New ➪ Web Site from Visual Studio’s main menu.

A Web Site Project site is simply a Windows folder with a bunch of files and subfolders in it. There is no collective file (known as the project file with a .vbproj or .csproj extension) that keeps track of all the individual files in the website. You just point VS to a folder, and it instantly opens it as a website. This makes it very easy to create copies of the site, move them, and share them with others, because no dependencies exist with files on your local system. Because of the lack of a central project file, Web Site Projects are usually simply referred to as websites, which is the term I use in the remainder of this articles.
Note You can’t use a Web Site Project to create MVC or Web AP applications.
-------------------------------------------------------------------------------------
Choosing between Web Site Projects and Web Application Projects

No comments:

Post a Comment

We are happy for leaving comments,we will don't let you bite stay with us

Popular Posts

Contact Form

Name

Email *

Message *