ASP.NET Environment

Discussion in 'ASP.NET' started by MinalS, Jun 24, 2015.

  1. The Visual Studio application is the main development tool for creating web applications. In Visual Studio, user can create, debug and compile the code. The applications related to web, services, desktop and mobile applications can be easily created using the development tools.

    Visual Studio IDE

    The Visual Studio application shares an integrated development environment consisting of various elements. Once user starts the visual studio application, the Start Page is displayed.


    User can select the New Project option for creating a new ASP.NET project in the application.


    In the New Project window, select the appropriate web application. Add name for the folders and files for the site. The two files are Default.aspx and Default.aspx.cs. The Default.aspx file contains ASP and HTML code used for defining the form. The .cs file defines the code in the language selected by the user. The actions to be performed are defined.

    The web designer window is the default window for any web application. The other windows in web application are:

    1. Solution Explorer

    User can manage the projects and files using the solution explorer. The functionality like renaming an existing solution, adding and removing files, projects, references, setting properties for a project. The solution explorer window is as shown:


    User can add items to the existing project by clicking Add, Existing Project as shown below:


    2. Toolbox

    The toolbox displays the icons for the controls user can add to the projects. Click View menu, select Toolbox option for opening it. User can drag and drop the controls to the design view or in the code editor.

    The toolbox displays only items that are appropriate to the file user is working. A filter can be applied to the items.


    3. Properties Window

    A property is a data for describing controls. User can define the location, size, color and identification of the control. User can modify the characteristics at design and runtime. The Properties window in visual studio application is as shown below:


    User can select the Properties window by clicking View, Properties window. The F4 is shortcut key for opening the properties window.

    4. Error list window

    The error list window is used to display the error, warnings once the code is compiled. The syntax errors are maintained by the Intellisense. By double clicking the error message, the file with associated problem opens. Select View menu, click Error list option.

    The error list window in visual studio application is as shown below:


    View and Windows

    User can work with the windows in the application. The window contains source and design view. User can navigate between the design and source view by clicking the appropriate buttons.
    1. Click on the Design button to navigate to the design window. User can move to the source code window by clicking the source button.
    2. Click on the Close button on the right corner or select it from the View menu.
    3. Click Auto Hide button to hide the window.
    4. User can modify the size of the window by dragging it.
    Adding Folders and Files to website

    When a user creates web form, the application creates the HTML for the form and displays it in the source view of the designer. User can add other files, folders to the existing item on the web site.
    1. Right click on the project and add the folder in the solution explorer and select New folder. The folder is added to the solution.
    2. Right click on the solution explorer and select the folder from the list, the ASP.NET folder is added.
    3. Right click on the project or solution, select add new item in the explorer, and select it from the dialog box.

    Project and Solutions

    ASP.NET applications consists of web content files, assemblies, source files, data source files, user controls, references, etc. These files are useful for creating a website. The solution is created when user creates a website. It is available in the solution explorer.

    A project consists of content file, source file, and files like data and image files. The assembly contents are executable or dynamic link library file.

    The files present in the project are web service (asmx), master page file (.master), Site map (.sitemap), User Control (.ascx), configuration file (.config), ASP.NET web pages (.aspx).

    User Control (.ascx) file: It is user controls file. The controls are similar to the web pages. The files cannot be directly accesses by these controls. They are hosted in ASP.NET web page.

    Web Service (.asmx) file: The web service is a collection of methods. These methods are called over internet. The file shares application resources, configuration settings, memory.

    Configuration file (.config) file: It is XML based configuration file for ASP.NET. The features like state management, security, and mamory management are included.

    ASP.NET web pages (.aspx) file: The web pages contain user interface and application code.

    Global.asax: The global application file is used for defining the global variables. They can be accessed from any web page in the application.

    Code behind files: The code behind files have .cs extension. The application logic is separated from the user interface.

    .ashx file: They define the default HTTP handlers for all web handlers.

    Executing a project

    To compile an application, the steps mentioned below are performed:
    1. An application is created in ASP.NET
    2. Click Build, Build Solution to compile the application
    For executing the project, follow one of the methods mentioned below:
    1. Press F5 key
    2. In the menu bar, click Debug option, click Start debugging.
    3. Select the Start Debugging button present on the toolbar
    Last edited by a moderator: Jan 21, 2017

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice