Posts Tagged ‘Asp.net page elements’

Elements of ASP.NET page?

ASP.NET is a text file with the extension .aspx. This files should be stored in an ASP.NET web server.

When client requests a web page, the server passes the page to the ASP.NET run time. ASP.NET Runtime is a program that runs on the server that is responsible for reading the page and compiling into a .NET class. This class is then used to produce the HTML that is send back to the user. Compiling process is done only during the first request of the web page, during subsequent request .NET class can respond directly to the request producing a pages HTML and sending it to the client, until there is a change in the .aspx file.

An .aspx file or ASP.NET page consists of the following elements.

  • Directives
  • Code declaration blocks
  • Code render blocks
  • ASP.NET server controls
  • Server-side comments
  • Literral text and HTML tags

Directives

Directives control how the page is compiled, specify how the page is cashed by web browsers, aid debugging (error-fixing), and allow you to import classes to use with in your page. Directive declaration starts with <%@. This is followed by the directive name, plus any attributes and their corresponding values. The directive ends with %>. There are many diretives that can be sued and some of them are listed below.

  • Import
  • Page

Example

<%@ Page Language=”VB” %>
<%@ Page Language=”C#” %>

Summary

ASP.NET Runtime is a program that runs on the server that is responsible for reading the page and compiling into a .NET class.

Be the first to comment - What do you think?  Posted by admin - January 23, 2010 at 8:24 pm

Categories: ASP.net   Tags: