开发者

How do I include another file in an httpHandler?

开发者 https://www.devze.com 2023-03-09 19:52 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消