Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

ASP.NET environment settings


May 12, 2021 ASP.NET


Table of contents


Environment settings

ASP.NET provides an abstraction layer at the top of HTTP, where the application is built. It provides high-level entities, such as classes and components in an object-oriented paradigm.

The ASP.NET and front end for building your application is Visual Studio. In this tutorial, we focus on Visual Studio 2008.

Visual Studio is an integrated development environment for writing, compiling, and debugging code. It provides a ASP.NET set of development tools for building web applications, web services, desktop applications, and mobile applications.

Visual Studio IDE

The new project window allows you to select an application template from the available templates.

ASP.NET environment settings

When you open a new web site, ASP.NET provides the launch folder and the site's files, including two files for the first web form in the site.

Files named Default.aspx include HTML and asp code, which can define a form, a file named Default.aspx.cs (coded for C#) or a file named Default.aspx.vb (coded for VB) that contains code for the language of your choice, and this code is responsible for the actions performed in a form.

The initial window in the Visual Studio IDE is the Web Forms Designer window. O ther supported windows are the toolbox, Solution Explorer, and content windows. Designers design a web form, add code to the form for control, and edit the program based on the code you need.

Use views and windows

You can use the window in the following ways:

  • Change the web form designer from one view to another, and click the Design or source button.
  • To close a window, click the close button in the upper right corner and select from the view menu if it is displayed again.
  • To hide a window, click the Auto-Hide button. T he window becomes a label. I f it is displayed again, click the Auto Hide button again.
  • To change the size of the window, drag and drop the window.

ASP.NET environment settings

Add folders and files to your site

When a new web form is created, Visual Studio automatically launches HTML for the form generation and displays the source view on the web form designer. S olution Explorer is used to add any other files, folders, or existing projects on the web site.

  • To add a standard folder, right-click on the item or folder you're about to add to Solution Manager and select a new folder.
  • To add a ASP.NET folder, right-click on the item in Solution Manager and select the folder in the list.
  • To add an existing item to the site, right-click on the item you're about to add to Solution Manager and select it in the conversation window.

Projects and solutions

A typical ASP.NET application consists of many items: web content files (.aspx), source files (.cs files), assemblies (.dll and .exe files), data source files (.mgd files), references, icons, user controls, and other miscellaneous files and folders. All the files that make up the URL are included in one solution.

When a new website was created, . VB2008 automatically creates the solution and displays it in Solution Manager.

The solution may contain one or more projects. A project contains content files, source files, and other files such as data sources and picture files. In general, the contents of a project can be compiled into an assembly as an executable .exe or a dynamic link library (.dll) file

In general, an item contains the following files:

  • Page file (.aspx)
  • User controls (.ascx)
  • Web Server (.asmx)
  • Main page (.master)
  • Site navigation (.sitemap)
  • Site profile (.config)

Build and run the project

You can execute an application by:

  • Select Start
  • Choose to start without debugging from the debug menu
  • Press F5
  • Ctrl-F5

The basic idea of building a .exe is .dll or a file is generated by selecting a command from the Build menu.