我怎么能叫从同一个解决方案的另一个项目中的JavaScript功能?

问题描述:

我有一个asp.net web表单3.5解决方案与多个项目。在(网络)项目​​之一,我有一个包含JavaScript文件的脚本文件夹。在我的项目中aspxpage我想调用一个js函数驻留在被称为MyScript.js一个js文件它坐落在B工程?

I have a asp.net webforms 3.5 solution with multiple projects. In one of the (web) projects I have a script folder containing javascript files. In my aspxpage in project A I would like to call a js function residing in a js file called MyScript.js which sits in project B?

从包含项目B中的JS文件像这样:

Include the JS file from project B like so:

<script src="http://myUrl.com/js/MyScript.js"></script>

然后就打电话给你想要的方式。

Then just call the method you want.