Visual Studio - Create your first web page

by
Jeremy Canfield |
Updated: March 12 2020
| Visual Studio articles
Follow these directions to create your first Web page in Visual Studio.
- Launch Visual Studio
- Select New Project
- In the New Project pop-up box, select Templates > Visual C# or Visual Basic > Web > ASP.NET Web Application
- At the bottom of the New Project dialog box, give the website a name, make note of the Location, and select OK
- In the New ASP.NET Project dialog box, select Empty, remove the check-mark from Host in the cloud, and select OK
Note: As an example, if you created a project named WebApplication1, there will be a few folders and files named WebApplication1.
- C:\Users\User1\Documents\Visual Studio 2015\Projects\WebApplication1 (parent folder)
- C:\Users\User1\Documents\Visual Studio 2015\Projects\WebApplication1\WebApplication1 (Visual Studio project)
- C:\Users\User1\Documents\Visual Studio 2015\Projects\WebApplication1\WebApplication1\ (child folder)
- Press Ctrl + Shift + A (or right-click on the name of your new project and select Add > Add New Item).
- In the Add New Item dialog box, select Web Form, change the name to stage1.aspx, and select Add
- At the bottom of the page, change the view to Design.
- Type Hello World.
- Press Ctrl + F5 to preview your site in a Web browser.
- Select Build > Publish ProjectName
- Make the following selections in the Publish Web dialog box:
- Profile: Custom
- Connection: In the Publish method drop-down, select File System. In Target location, select a directory on your Web server, such as C:\\inetpub\\wwwroot
- Settings: The Configuration drop-down should be set to Release.
- Preview: The name of the project should be displayed.
- Select Publish. The following folders and files should now be in the Web files directory:
- .vs (directory)
- App_Data (directory)
- App_Themes (directory)
- bin (directory)
- MasterPages (directory)
- node_modules (directory)
- project_name (directory)
- pages (ASP.Net files)
To view the newly created site in a Web browser, go to http://<servername>/stage1.aspx.
Did you find this article helpful?
If so, consider buying me a coffee over at