Create and configure a Web application

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search

Create and configure a Web application.

A: Create a new Web application

To create a new Web project

1. On the File menu, point to New and then click Web Site to display the New Web Site dialog box.

2. In the Templates pane, select the type of Web project you want to create.

 ASP.NET Web Site
 ASP.NET Web Service
 Empty Web Site

3. In the Language drop down, specify the primary language that you would like this to be created with.

 Visual Base
 Visual C#
 Visual J#

4. In the Location drop down, specify the place where this will be stored.

 File System
 HTTP
 FTP

For example, to create a project titled myWebApp at the default localhost location, the URL string placed in the Location text box will look like this: http://localhost/myWebApp. This allows for exact placement of your project files in a directory on a Web server. Note If the local computer you are working on is also a Web server, you can create your Web project on that computer.

The first time you start Visual Studio, the default location of a Web project is your local computer. In subsequent Visual Studio sessions, you can select the location of a previously used Web server from a drop-down list. If you want to choose a different server, you can click the Browse button to find other servers on your network, or you can type in the URL to a server (for example, http://domain.com) and press ENTER.


5. Click OK to create the Web project. Visual Studio connects to the server and adds the appropriate project items to Solution Explorer in the project node.

B: Add Web Forms pages to a Web Application

1. On the File menu, point to New and then click File to display the Add New Item dialog box.

2. In the Templates pane, select Web Form.

3. In the Language drop down, specify the primary language that you would like this to be created with.

 Visual Base
 Visual C#
 Visual J#

4. Provide a unique name for this Web Form.

5. Click OK and a new web form will be created in the web project that you are currently in.


Personal tools