In this ASP.NET tutorial you will learn Creating an ASP.NET file system Web site using ASP.NET in Visual Studio 2010 using the .NET framework 4.0. The definition of a file system web site is a site which stores your website’s contents like the pages, images and other resources in a folder in your local computer.
Other types of web site creating techniques include local IIS web site which will store your website’s contents like the pages, images and other resources in a subfolder of the local IIS root which is by default “C:\inetpub”. The other type of website is an FTP site, where all the website’s contents like the pages, images and other resources are stored on a remote server which you have access to over the Internet using File Transfer Protocol also known as FTP. A remote site stores files on a remote server that you can access across a local network.
In this ASP.NET tutorial you will create a file system Web site that does not require Microsoft Internet Information Services (IIS) and you need is to create and run your page in the local file system as mentioned below.
- Open the Visual Studio 2010.
- Go to the File menu and select on “New Web Site”.
- Select the “ASP.NET Web Site” in the Visual Studio installed templates.
When you create a new Web site, you always specify a template, which is used to create the web application which contains different files and folders of the website. For this ASP.NET tutoria the website created is based on the ASP.NET Web Site template as it need the creation of some folders and a few default files.
The following screen shot shows how the New Web Site dialog box appears.
- Next, in the Web Location box, select File System.
- Then enter the name of the folder where you want to keep the pages, files and folders of your Web site.
For example, type the folder name C:\BasicWebSite.
- Select your preferred language, from wither Visual Basic or Visual C# from the Language list.
When you create your web site, the programming language you choose here will be the default language used throughout the application, but you also have the ability to use multiple languages in the same web application by creating pages and components of your web site in different programming languages.
- After you are done, click on OK.
When you use Visual Web Developer or Visual Studio 2010 to create a web site, it automatically creates the folder and a new page named Default.aspx. When this new page is created, by default Visual Web Developer or Visual Studio 2010 displays the page in Source view, where you can see the page’s HTML elements.
The following screen shot shows the Source view of a default Web page.