How do I include another file in an httpHandler?
I'm creating a webhandler and want to include cl开发者_如何学JAVAasses from another file. How do I do this?
Move the code from the .aspx
file to a .vb
file. If the .vb
file is not in the same project as the .ashx
file, then compile the file into an assembly and reference the assembly in the project where the .ashx
exists. Then you can instantiate the classes in the vb
file in your ashx
.
Include those projects as references in the project that has the HTTPHandler, and then refer to those classes in code; make sure you have the appropriate using namespace definitions defined.
If this doesn't help, please elaborate on the problem.
HTH.
精彩评论