Rendering technique in asp.net

Discuss ASP, ASP.net as it applies to web design, custom web apps, databases, search engine optimization or Mod Rewrite to make search engine friendly pages and more related matters.

Moderator: John55

Rendering technique in asp.net

Postby rajesh1 » Wed Sep 23, 2009 9:52 am

ASP.NET uses a visited composites rendering technique. During compilation, the template (.aspx) file is compiled into initialization code which builds a control tree (the composite) representing the original template. Literal text goes into instances of the Literal control class, and server controls are represented by instances of a specific control class. The initialization code is combined with user-written code (usually by the assembly of multiple partial classes) and results in a class specific for the page. The page doubles as the root of the control tree.

Actual requests for the page are processed through a number of steps. First, during the initialization steps, an instance of the page class is created and the initialization code is executed. This produces the initial control tree which is now typically manipulated by the methods of the page in the following steps. As each node in the tree is a control represented as an instance of a class, the code may change the tree structure as well as manipulate the properties/methods of the individual nodes. Finally, during the rendering step a visitor is used to visit every node in the tree, asking each node to render itself using the methods of the visitor. The resulting HTML output is sent to the client.

After the request has been processed, the instance of the page class is discarded and with it the entire control tree. This is usually a source of confusion among novice ASP.NET programmers that rely on class instance members that are lost with every page request/response cycle.


playstation 2
Doctor Reviews
rajesh1
 
Posts: 6
Joined: Wed Sep 23, 2009 9:48 am

Re: Rendering technique in asp.net

Postby matt525 » Wed Sep 30, 2009 2:21 pm

ASP.net is more popular because of its flexibility but PHP is more easy to user
matt525
 
Posts: 11
Joined: Wed Sep 30, 2009 2:11 pm


Return to ASP Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron