简体   繁体   English

非编译项目中的代码重用

[英]Code reuse in non-compiled project

I have a non-compiled web app which has several pages that all have similar functionality. 我有一个未编译的Web应用程序,其中有几个页面都具有相似的功能。 If I compile the code it's easy to share classes between files, but I'm having trouble achieving the same without compiling. 如果我编译代码,很容易在文件之间共享类,但是如果不编译就很难实现相同的目的。 If I have an XmlRequest.cs file, how do I access its class from Compare.aspx.cs? 如果我有XmlRequest.cs文件,如何从Compare.aspx.cs访问其类?

如果将XmlRequest.cs添加到名为App_Code的文件夹中,它将在整个Web应用程序中可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM