I am trying to add a few additional lines of code to the Page_Load method of an ASP.Net page, where the existing Page_Load code is stored in a compiled codebehind DLL. I don’t have access to the source for the DLL, although I can extract the code for the Page_Load method using Dis#.
What is the best way to add the new code? I need the existing Page_Load code to execute, together with the new code, and it doesn’t matter in what order they execute.
Specifically, I’m fixing an old application that uses the Telerik RadEditor which doesn’t work correctly under Firefox 6. See this page for the exact code I’m adding.
If you can access the ASPX portion, you can try adding a code block to the ASPX, and overriding OnInit or OnPreInit, which should work fine for the code you’re trying to add.