Understanding Code Behind in .Net Framework
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.
Framework – New Features and Benefits | Overview
of .NET Framework 3.5 Architecture | Overview
of Unary Operators of C# (C Sharp) | Understanding
of Checked and Unchecked Statement Type of C# (C Sharp) | Understanding
of fixed Statement in C# (C Sharp) | Understanding
of lock Statement in C# (C Sharp) | Understanding
of Logical Operators (Bitwise, Boolean) in C# (C Sharp) | Understanding
of Logical Operators (Conditional) in C# (C Sharp) |
to our mailing list and receive new articles
: We never rent, trade, or sell my email lists to
Visit .NET Programming Tutorial Homepage