How to Install and Setup Visual Studio for ASP.NET?
Last Updated :
06 Oct, 2021
Visual Studio is an Integrated Development Environment(IDE) developed by Microsoft to develop GUI(Graphical User Interface), Web applications, console, web apps, mobile apps, cloud, and web services, etc. To install and use Visual Studio for the commercial purpose one must buy a license from Microsoft. For learning (non-commercial) purpose, Microsoft provided a free Visual Studio Community Version. We will use the Visual Studio Community Version 2019. The latest version of Visual Studio makes the whole process very easy for ASP.NET applications. There may be some variations in the steps for installing and setting up the Visual Studio IDE. So we recommend installing the latest version of Visual Studio.
Steps for Installing & Setting Up Visual Studio 2019
Step 1: Download the
Visual Studio Community Version 2019
Step 2: Run the
.exe file and follow the instructions to install Visual Studio Community Version on the system.
Step 3: Select
ASP.NET and web development from the options and click to install in bottom right corner as shown below. We can also select
.NET desktop development option for windows forms and console applications etc. Here we are selecting both the options. We can also modify it after installation.
Step 4: Click on launch and it will be prompted to sign in for the first time. The sign-in step is optional so it can be skipped. The dialog box will appear for the first time only and ask to choose the Development Settings and color theme. Once select required options, click on Start Visual Studio option. This step is optional in some versions.
Step 5: To create a new ASP.NET Web application,
Go to File --> New -->Project like as shown below:
Step 6: As soon as we select the project, we will notice the different options of the Project. We can filter them according to our choice. We can see the
3 filters(Language, Platform, Project Type) on the right side of the search bar in the below given screenshot. Here we are not using the filters. We are simply choosing
ASP.NET Web Application(.NET Framework) and click
Next. We can see the options of C#, Windows, and Library below the chosen project. There are two choices as we can also find the
ASP.NET Web Application(.NET Framework) using VB(Visual Basic).
Step 7: The next step is to configure the project. Here, we have to choose the Project Name and Solution name and click on Create Button. We can also change the location of the project. A project name is a subset of the solution name. We can put a different name for the solution. In other words, the solution is like a container for projects.

We are putting Project name and Solution name as
GeeksforGeeks as shown in the below screenshot.
Step 8: Here, we have to choose the type of the ASP.NET Web Application. We are creating a web application so first, choose the project type as
Empty to understand a simple application. Then choose the
Web-Forms which will add the basic folders to create Web Forms Application. After that click
Create button.

In the below image, in the right-hand side, the Solution Explorer is open by default. There we can see a file
Global.asax.cs which is a common file for the entire application. This file contains specific information related to the application and used to initialize application specific variables to their default values.
Step 9: Now add a Web Form file to the project "GeeksforGeeks" which contains the web-specific code for the project. Just
Right click on GeeksforGeeks in the Solution Explorer.
Select Add and then
select Web Form from the menu as shown below.

It will prompt for the name of the Web Form. We are putting the name as
TestingWebForm and click
OK.

The default code for the
TestingWebForm is shown as below:
Step 10: Now write a sample code in
TestingWebForm.aspx file which will display "Hello Geeks!" as an output. The explanation of code will be discussed further.
html
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestingWebForm.aspx.cs" Inherits="GeeksforGeeks.TestingWebForm" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%Response.Write("Hello Geeks!"); %>
</div>
</form>
</body>
</html>
Now to execute the code, click on the Run button as shown in below screenshot. For the first time, we may need to set up the browser configuration.
Finally the Output:
Similar Reads
How to Install and Setup Visual Studio for C#?
Installing and setting up Visual Studio is the first step for developers to build, compile, and run C# applications. Whether you are a beginner or an experienced programmer, Visual Studio provides a powerful integrated development environment (IDE) for writing and debugging C# code. With Visual Stud
3 min read
How to Install and Setup Live Server Extensions on Visual Studio code?
Visual Studio Code is one of the most sought-after IDE (Integrated Development Interface) of the current time. It helps the developers to efficiently write, build and test software over a single platform by combining and providing a multilateral set of functions. Visual Studio Code supports various
3 min read
How to Install Flutter on Visual Studio Code?
In this article, we will walk through the process of installing Flutter in Visual Studio Code. Flutter is an open-source portable UI framework for mobile, desktop, and web. It is developed and managed by Google, Flutter is used for creating a high-quality, beautiful, and fast native interface for an
4 min read
Dart - Installation and Setup in Visual Studio Code
If you want to start developing with Dart, one of the easiest ways is to install Dart in Visual Studio Code. VS Code offers a lightweight, user-friendly environment that integrates well with Dart programming. In this guide, weâll walk you through installing Dart in VS Code and configuring the necess
6 min read
How to Install and Use Packages in Visual Studio for MacOS?
In this article, we will learn how to install and use a package in Visual Studio for MacOS. Visual Studio is an Integrated Development Environment(IDE) developed by Microsoft to develop GUI(Graphical User Interface), console, Web applications, web apps, mobile apps, cloud, web services, etc. Native
2 min read
How to Download and Install Visual Studio Code on Ubuntu?
Visual Studio Code is a code editor that is basically used for web development or cloud platforms, but nowadays Visual Studio Code can do a lot. It is stated as the second most used code editor by developers in 2022 so if you are an aspiring IT student or a developer you should know how to use Visua
1 min read
How to Install a C# Class Library in Visual Studio?
A C# library project is a separate project used to hold utility classes. So this might be the class that handles our database or might handle some communications with the network. In our case, we are going to create a math library that is a stand-in for some of those other cases. It is a single sour
3 min read
How to Setup MySQL Database in Visual Studio 2022 For a C++ Application?
Databases play a crucial role in storing, retrieving, and managing data efficiently. MySQL, a popular open-source Relational Database Management System, is widely used for this purpose. C++ acts as the intermediary connecting user interfaces and MySQL databases, enabling developers to easily retriev
5 min read
How to Install Visual Studio Code on Windows?
Visual Studio Code (VS Code) is a free, lightweight, and open-source code editor developed by Microsoft. It supports multiple operating systems, including Windows, macOS, and Linux. VS Code is designed to be versatile and user-friendly, offering features such as:Syntax Highlighting and Autocompletio
3 min read
How to Install R and R Studio?
Navigating the R language installation process and setting up R Studio is crucial for anyone looking to delve into data analysis, statistical computing, and graphical representation with R. In this article, we provide a step-by-step guide on how to install R and configure R Studio on your system. Wh
6 min read