How To Create An Application In ASP.NET


Web applications are created by adding web forms to the application and placing controls to the forms and respond to user interaction with the forms. The visual studio .NET is used to create a web application. It is used to create different types of web application and web services provide access to data. ASP.NET is a compiled programming environment that uses the .NET framework to create an application.

Creating an ASP.NET Web Application

Click on Start and the start menu will be displayed.
Select the programs and then select Microsoft Visual Studio.NET.
The submenu will be displayed. Click the visual studio.NET.
After opening the visual studio.NET application click the file and the file menu is displayed. Place the mouse to new and click the project in the submenu.
Then the new project will open and select the visual basic project folder and a set of templates are displayed.
Select the ASP.NET web application and give the name for the web application.
Set the location of the web application during naming the web application and the new project is created in a particular location in the Visual Studio.NET. 

Naming the Form

The blank web form is created in the web project and the name of the project can be changed. By default, the web form is named WebForm1.aspx.
Right-click the name of the form in solution explorer and select rename in the short menu.
Clear the name of the form and name the new name and name the form with the extension of .aspx.
Click enter and the name of the web form will be changed.

Changing class with the webform

The class name of the web form and the name of the web form are the same. 
Change the name of the class by double-clicking on the form in the design view and the code will open.
Change the name of the class.
The class name in the @page directive of the web form is also changed. Change the name of the class in the @page directive.

Adding a web form

A web application can contain many web forms and there is a default form and many forms can be added to it in the same project.
Right-click the name of the project and move the mouse to add and select add web form in the add submenu.
Name the web form in the name text box.
Select open to create a new form.
The class name should be the same as the web form name.

Designing Forms

Application In ASP.NET
The visual studio .NET has drag controls and by arranging the controls in webform the webform. Basically visual studio .NET has two layouts as a grid layout and flow layout. The layout is very important because the whole web form depends on the layout. 

Grid Layout

It uses the absolute position controls to the web forms. Depending on the size of the form the position of the control will never change. Grid Layout is used when the size of the control is known.

Flow Layout

It will not position the controls to the forms and is determined automatically on the screen. If control is placed the next control is placed based on the previous control width and height. The flow layout is used when the size of the control is not known.

Adding Controls

Controls are added to the form instead of using the HTML tags in it. The toolbox is used in the Visual Studio .NET to perform table operation instead of using the table HTML tags.
Open the form.
Click label control in the options of the toolbox and the label control is selected in it.
Click the control required in the toolbox to the form and place it.
Right-click the label control and select the properties in the menu.
The controls are customized in the properties menu by renaming the field or changing the color of the text in the form.
Many Controls can be added to the webform.
Buttons can also be added to the webform.

Similar Articles