When the ASPX page is embedded with the code of either C# or VB .Net, the ASP .Net run time automatically compiles the code into an assembly and loads it. If the code is kept in a separate source file either as a VB or C# file, it has to be compiled by the programmer, which will be used by the run time for further execution
When the code is placed inside the script tag, it is treated to be class level code and any other code found is considered to be a part of the method that renders the web page
So ultimately the compilation is only once and all the subsequent requests are entertained only by using the compiled code/DLL
By default ASP.NET compiles pages and controls on a per directory level
ASP.NET then compiles both classes into the same assembly.
Intellisense works in this code while you’re typing in Visual Studio even though there’s no second partial class anywhere in your project.
So where is this the other half of this partial class coming from? ASP.NET generates it at compile time
The DataEntry base class inherits from System.Web.UI.Page in this example, but you can override the base class in the partial class definition by inheriting from any other Page derived class. For example, you can create a common base page class for your application and store it in the APP_CODE folder and have any number of pages in the Web application inherit from this class
If you change the .dll and write a new version of it to the Bin folder, ASP.NET detects the update and uses the new version of the .dll for new page requests from then on