Bootstrap FreeKB - Visual Studio - Create your first web page
Visual Studio - Create your first web page

Updated:   |  Visual Studio articles

Follow these directions to create your first Web page in Visual Studio.

  1. Launch Visual Studio
  2. Select New Project
  3. In the New Project pop-up box, select Templates > Visual C# or Visual Basic > Web ASP.NET Web Application
  4. At the bottom of the New Project dialog box, give the website a name, make note of the Location, and select OK
  5. 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)
  1. Press Ctrl + Shift + A (or right-click on the name of your new project and select Add > Add New Item).
  2. In the Add New Item dialog box, select Web Form, change the name to stage1.aspx, and select Add
  3. At the bottom of the page, change the view to Design.
  4. Type Hello World.
  5. Press Ctrl + F5 to preview your site in a Web browser.
  6. Select Build > Publish ProjectName
  7. 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. 
  8. 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 Buy Me A Coffee



Comments


Add a Comment


Please enter a9aaad in the box below so that we can be sure you are a human.