asp.net as Code-behind model

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

asp.net as Code-behind model

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

It is recommended by Microsoft for dealing with dynamic program code to use the code-behind model, which places this code in a separate file or in a specially designated script tag. Code-behind files typically have names like MyPage.aspx.cs or MyPage.aspx.vb (same filename as the ASPX file, with the final extension denoting the page language). This practice is automatic in Microsoft Visual Studio and other IDEs. When using this style of programming, the developer writes code to respond to different events, like the page being loaded, or a control being clicked, rather than a procedural walk through the document.

ASP.NET's code-behind model marks a departure from Classic ASP in that it encourages developers to build applications with separation of presentation and content in mind. In theory, this would allow a web designer, for example, to focus on the design markup with less potential for disturbing the programming code that drives it. This is similar to the separation of the controller from the view in model-view-controller frameworks.


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

Return to ASP Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron