It depends on how you deploy your code. You use the precompile option before publishing or just publishing with precompilation.
If you just publish, you can simply replace the .aspx and aspx.cs files, and the site will be dynamically recompiled.
If you precompiled it, you probably only remained with the .dll and .aspx files so that you had to deploy a new copy of the DLL file for your site and the .aspx files. MSDeploy replaces the entire site by default.
source share