Personally, I think you are mistaken.
Why not instead wrap your code in a function that might even contain a physical aspx file, but the contents of the page are optional.
Then you can add the page to the documented library of standard pages that comes with SharePoint when this feature is activated, all of this can be done using CAML (XML), and you wonβt need to enter the code into the function receiver.
source share