What is the difference between src and Code-Behind

Platform: ASP.NET| Category: Basic

Src attribute means you deploy the source code files and everything is compiled JIT (just-in-time) as needed.
Many people prefer this since they don’t have to manually worry about compiling and messing with dlls — it just works.
Of course, the source is now on the server, for anyone with access to the server — but not just anyone on the web.

CodeBehind attribute doesn’t really ‘do’ anything, its just a helper for VS.NET to associate the code file with the aspx file.
This is necessary since VS.NET automates the pre-compiling that is harder by hand, and therefore the Src attribute is also gone.
Now there is only a dll to deploy, no source, so it is certainly better protected, although its always decompilable even then.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.