I'm working on a C# updatable ASP.NET 2.0 precompiled website. Since the code-behind cannot be altered (source code is not available), I'm adding code directly inside the aspx files (inside the script tag).
The trouble is that a lot of identical code must be copy-pasted between multiple aspx files. I created an external library in order to avoid code duplication then referenced this library from the website. However, I'm not able to access the library's classes from the aspx files. I tried adding an import directive at the top of the page but it is not working at all.
What would be the recommend way to avoid code duplication?