Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 .js 文件中有一个 jQuery 函数,该函数需要传递一个查询字符串参数。
如果我尝试在 ScriptManager 中使用 CompositeScript 功能,它会在具有查询字符串的文件上呕吐。有没有办法解决?
我试图做同样的事情,我得到的错误是“URL不是虚拟路径”,所以我假设路径必须是虚拟的。因此,您可能无法执行此操作,因为将查询字符串变量附加到路径会导致 URI 阻塞。
如果是全局变量,您可以在页面或母版页中设置变量,因此您不需要传递查询字符串。
可能是一种完成你正在完成的事情的方法,但我的猜测是你必须在另一个步骤中添加,比如到 jsfile.js?qv=whatever 到 jsfile.js 的路由,或者添加一个 httphandler。可能比它的价值更多的麻烦。
只是猜测。