What is the difference between src and Code-Behind?

Difference between src and Code-Behind.

- With the ‘src’ attribute, the source code files are deployed and are compiled by the JIT as needed.

- Though the code is available to everyone with an access to the server (NOT anyone on the web), this method is preferred as it does away with the compilation of the DLLs.

- ‘CodeBehind’ attribute just has the VS.NET associate the code file with the aspx file. This is necessary since VS.NET automates the pre-compiling that is harder by hand.

- Due to this the ‘Src’ attribute is done away with having only a DLL to be deployed enhancing the protection level even though it can be decompiled.

Difference between src and Code-Behind.

Src: is a way mention the name of the code-behind class to dynamically compile on the request for a page.

Code-behind: is the logic written behind the UI design file. It specifies the name of the compiled file that contains the class. Code-behind attribute is only used for.Net.
What is the difference between URL and URI?
What is the difference between URL and URI? - A URL (Uniform Resource Locator) is the address of some resource on the Web. A resource is nothing but a page of a site...
What is the Pre-Compilation feature of ASP.NET 2.0?
What is the Pre-Compilation feature of ASP.NET 2.0? - the pre-compilation feature is used with which an entire site is precompiled before it is made available to users...
How can we create custom controls in ASP.NET?
How can we create custom controls in ASP.NET? - Custom controls are user defined controls. They can be created by grouping existing controls..
Post your comment