Brief description  about Online courses   join in Online courses

How to Create ASP.NET Application

Rahul  Dutta
Rahul Dutta
IT Software

ASP.NET is a Web application framework developed and marketed by Microsoft to allow programmers to build dynamic Web sites, Web applications and Web services

A Microsoft server-side Web technology. ASP.NET takes an object-oriented programming approach to Web page execution. Every element in an ASP.NET page is treated as an object and run on the server. An ASP.NET page gets compiled into an intermediate language by a .NET Common Language Runtime-compliant compiler. Then a JIT compiler turns the intermediate code to native machine code, and that machine code is eventually run on the processor. Because the code is run straight from the processor, pages load much faster than classic ASP pages, where embedded VBScript or JScript had to be continuously interpreted and cached.

ASP.NET is used to create Web pages and Web services and is an integral part of Microsoft's .NET vision.

Details of the step is mentioned below

Step: Launch Visual Studio. Choose File->New->Web Site. Visual Studio opens a dialog box as below asking the user to choose a web site template.


•    Choose “ASP.NET Web Site” under Templates.
•    Select “File System” from location dropdown. Select “Visual C#” or “VB.NET” from Language dropdown.
•    Mention the path where solution needs to be saved.


Templates: To make easy for the developers to create ASP.NET applications, Visual Studio offers predefined templates.  Templates load the project with basic files required for the project type along with default settings. Depending on the installation the available templates may vary. Some of the common templates under New Web Site are
ASP.NET Web Site: loads the web site project with a default web page (default.aspx). 

ASP.NET Web Service: loads web service application with a default web service template.

Personal Web Site Starter Kit: This is designed to help users to quickly set up a personal web site. The template comes with a home page and pages for adding resume, favourite links and photos.
Empty Web Site: This template creates an ASP.NET Web application that includes a Web.config file and an App_Data folder, but no other files.
 ASP.NET Crystal Reports Web Site: This project template creates an ASP.NET Web site that supports Crystal Reports.

The location specifies where the website files will be stored. The following options are available
•    File System: Folder on the local computer or a network path.
•    HTTP: Allows editing web site over HTTP. This will be used to refer to the site hosted under IIS.
•    FTP: Allows editing a web site over FTP (File Transfer Protocol).

Language: The language option is available to specify the .NET programming language to be used to code website. The language selected will be the default language for the project.

Browse button can be used to select a location instead of specifying the location manually. On click of the Browse button, Visual Studio shows the
Choose Location dialog box with the following location options.
•    File System:  Browse through a tree of drives and directories or through the shares provided by other computers on the network and a select a folder.
•    Local IIS: This option allows us to browse the virtual directories available under local IIS.
•    FTP Site: This option allows us to choose a FTP site location.
•    Remote Web Server: This option accesses a website at a specified URL using HTTP.

Step: After specifying the details as mentioned in the above step, click on “OK” button. Visual Studio loads the web application as shown below.


Solution Explorer: Solution Explorer seen on the right side lists all the files available in the project / solution. The difference between project and solution is that solution can contain multiple projects.

Default.aspx: Visual Studio loads this default web page in a code window.

Design and Source Windows: Code or Source window allows edit files using code. Designer or Design window allows designing the layout of the files using tools.

  Add HTML label control inside the “

” control as below. And save the file (File-> Save or Click on Save icon).

Step: Run the application by pressing F5 key or Select Debug -> Start Debugging.
Visual Studio may open a dialog box as below asking to include a web.config file. Click on “OK” button.

Visual Studio loads the Hello World application in a default browser window as below. Close the browser window.


Compilation: Web Site can be compiled by choosing Build->Build Web Site option. Visual Studio will list any error or warning detected. The project can also be build by right clicking on the project under Solution Explorer and selecting “Build Web Site” option.

That was a sneak peek at creating a web application in .NET. This is just the tip of the iceberg. A lot of ground needs to be covered and much needs to be learned. Not worry, The next sections in this module will take you through some of the most important aspects of programming web applications. 

Write your comment now