After creating a new ASP.NET Web Application, Visual Studio leads you to something that looks like what we have in the screenshot below.
Let’s briefly explain what we have in this Visual Studio widows for ASP.NET Web Application
At the center of this window, is your work area; that is where you do the programming or see the design of your application, by default, when you first create an ASP.NET application in Visual Studio, Visual Studio creates a page called Default.aspx, this page is the standard name for ASP.NET index or homepage. And as you must have notices, it is this Default.aspx webpage that is opened in Source or code view already. (Take a closer look below)
Note: you can work in Design, Split orSource view for the opened web page.
Source view: is the code view, as shown in the screenshot above.
Design view: enables you to drag object into the web page. (This generates code, just as shown in the Source view)
Split view: splits the view into two, with one side for design and the other for source code view.
You can click to switch in between either view by clicking on it.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyWeb._Default" %>And
runat="server"(found in the head and form tag), which we will discuss later.
The Solution explorer window allows us to organize and navigate the files in our project. As you can also see the Default.aspx webpage (Web Form) and its Default.aspx.cs (Code-behind file) as well as other folders and Web.config file which we will discuss later
Structure of an ASP.NET files
Note: Default.aspx.designer.cs is autogenerated by Visual Studio, and it is adviced not to modify or edit its content.
For the rest of this tutorial we are going to use a Codebehind file (aspx.cs) to separate the application logic from the GUI (.aspx) presentation layout.