Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hiren SoniRank #694 · 3.5K reputationPosted Dec 23, 2009, 2:29 PM EST
code behind specifies the name of compiled file that contains the class associated with the page
Rekha SinghRank #1,571 · 1K reputationPosted Dec 29, 2009, 2:05 AM EST
compile when the page is requestedlogic for your page either in a code-behind class or in a code declaration
block in the .aspx file
The advantage of using the Codebehind attribute is that you forgo the first compilation of the Codebehind assembly. But when you use the Src attribute the codebehind file must be compiled on the fly.
*****************************************************************************
Please mark it Accepted if u find it helpful.
Raunak Jhawar51 reputationPosted Dec 29, 2009, 2:14 AM EST
On the other hand, The code-Behind is a complete isolated BLL i.e. Business Logic layer wherein the developer implements the logic to arruve to the desired outcome.
The client has access to the Source of the page but not to the Code-behind of the page,which obviously is not desired
example:
Src might contain the HTML tags in the form of say textboxes,button etc.,
Code behind might contain the logic how to add two numbers.
I hope that might clear your doubts.