Wednesday, 26 November 2014

ASP.NET Web Page and its structure

ASP.NET Web Page: - Introduction
The ASP.NET Web page works as the programmable user interface for Web application. The Web page is used to display information to the user in any browser or client device.

The Web Form implements application logic code with the help of VB,C# and J# language. When a client request for ASP.NET page the server executes the ASP.NET Page on the serever and returns the HTML page to the user.

The ASP.NET page has .aspx file extension. The .aspx stands for ActiveX Server Page Extension. By default the ASP.NET page contain the Form Control.

The beauty of ASP.NET page is it separates the user interface code with the business logic. The user interface code is stored into different file which has .aspx file extension. This file is called as designer file. The business code is stored into different file which has .aspx.vb file extension. This file is called as code behind file.

Structure of ASP.NET Web Page
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" inherits="WebApplication108._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
                                                                <title></title>
</head>
<body>
                                <form id="form1" runat="server">
                                                 <div>
   
                                                 </div>
                                </form>
</body>
</html>
Line1:-This line is called as Page directive declaration. The page directive declaration tells the user what language is used to write the business logic into the code behind logic file, the code behind logic file name and debugging information.

Line2:-This line is called as Document Type Declaration or DTP declaration.


Line3:-This line is called as HTML declaration. This HTML declaration tells the user that this particular web page is designed using HTML language.