I am working on creating an aspx page to display library code usage examples.
So, basically, I would like, for example: Description Source code Exit button (in datagrid)
Instead of copying and pasting the code from the button onto the aspx page for display, I thought it would be nice to be able to read the actual source code at runtime and display it. Besides the fact that it would be a stain, it would have the added benefit of ensuring that the source code is up to date, while copy and paste can become outdated if someone makes a change and forgot to refresh the aspx page with the new code.
I can imagine two possible ways to do this: 1) (kludgy). Deploy the code behind the files, which can then be read at runtime, and the corresponding function code can be parsed and displayed. 2) (Preferred) Runtime decompiles the DLL (as a reflector) and displays the code.
So, I know how to make # 1, but I don’t know about No. 2 (if that’s even possible).
tbone source
share