Home | Site Map | Submit Article
.
Article Search
 
Article Categories

Advice

Auto Motive

Business

Communications

Computers & Internet

Dating

Education

Employment

Entertainment

Environment

Family

Fashion

Finance

Food & Drink

Gardening

Health

Hobbies

Home Business

Home Improvement

Humor

Kids & Teen

Legal

Marketing

Music

Online Business

Parenting

Pets

Product Reviews

Real Estate

Recreation & Sports

Self Improvement

Site Promotion

Technology

Travel & Leisure

Web Development

Women

World Affairs

Writing

 
   
   Understanding Code Behind in .Net Framework


14 Mar 2008 02:22:53
| Balaji


Understanding Code Behind in .Net Framework

The ASP.NET Code Behind feature in .Net Framework allows developers to separate the server-side code from the presentation layer. This concept makes the server-side code to store in one file and the presentation code, that is, HTML code in another file. When you compile the ASP.NET page both these files get compiled as a single entity. In the traditional ASP model, this could not be achieved which often leads to intermingling of the code and the design.

The biggest advantage, in ASP.NET, is that the presentation code will be in .aspx file and the server-side code will be in any .Net compatible language such as Visual Basic.Net, C#, or J#. You can also do away with the presentation layer because you can give this role to the web designers. This saves time and you can concentrate only on the coding part of the application. In addition, you can create a class for your code and inherit this class from the ASP.NET Page object. By this way the class can access the page intrinsics and also interact with the postback architecture. After this you can create the ASP.NET page and apply a page directive to inherit from this new class.

But before you create an ASP.NET Code Behind class, you have to reference it to a namespace. The namespace could be System.Web.UI or` System.Web.UI.WebControls. Next you have to inherit the class from the Page object. You must declare some public instances of server controls using the name for the variables that are similar to the web controls. This procedure will create a link between the ASP.NET Code Behind class and the server controls.

You can use the ASP.NET Code Behind feature in various web applications development tools such as Visual Studio.Net and ASP.NET Web Matrix. They provide very easy ways to use the ASP.NET Code Behind. After dragging and dropping the server control from the Toolbox to the web page you can just right click on it to view the ASP.NET Code Behind page.

To access online version of the above article, go to http://www.dotnet-guide.com/codebehind.html



About Author :
Visit http://www.dotnet-guide.com for a complete introduction to .NET framework. Learn about ASP.NET, VB.NET, C# and other related technologies.

Home >> Technology

More Related Articles in " Technology "
>>
Wake up Webbie! WAP is Here! [ Author : Wild Bill Montgomery ]
>>
Microsoft Passport? Good or Bad for the Internet? [ Author : Richard Lowe ]
>>
Turing Machines and Universes [ Author : Sam Vaknin ]
>>
The Future of Voiceovers [ Author : Peter Drew ]
>>
RFID for Beginners [ Author : Amie Kandowski ]
>>
Pacific Scientific HTL Goes e-Kanban with Datacraft Solutions [ Author : Thomas Cutler ]
>>
ERP and CAD Integration in Engineer-to-Order Environment [ Author : <a href="http://www.trcutlerinc.com" target=" blank">TR Cutler, Inc.</a ]
>>
Create high-quality images with Digital cameras [ Author : Michael Sanford ]
>>
How to Find Quality Cameras and Lenses Online [ Author : Chris Robertson ]
>>
VoIP Phone Hype.....Phooey [ Author : Michael Lemm ]
 

 
© Copyright 2005-2007 Free Articles by articleburn.com All rights reserved
eXTReMe Tracker