预先计算 ASP.NET 嵌入式 WebRessource Url

发布于 2024-08-03 11:20:26 字数 320 浏览 2 评论 0原文

我有以下问题。
Assembly 中,存在通过“WebRessource”属性

Ok 导出的资源。我知道通过方法 GetWebRessourceUrl,我可以找到资源 Url,但这基本上发生在运行时。

我在编译时需要这个资源 URL。

为什么?

因为我有一个 Javascript 调用一些 WebRessource URL。 棘手的部分是,这个 Javascript 也嵌入在一个程序集中(与其他资源相同的程序集),并且是在编译时与其他资源一起生成和嵌入的。

我很感激每一个帮助。

I have the following Problem.
In an Assembly, there are Resources which are exported via "WebRessource" Attribute

Ok. I know that the through the Method GetWebRessourceUrl, I can find out the Ressource Url but this happens basically at Runtime.

I need this Resource Url at Compiletime.

Why?

Because I have a Javascript which calls some of the the WebRessource Urls.
The Tricky Part is, this Javascript is also in a assembly embedded (The same Assembly as the other Resources) and is Generated and embedded at compile Time with the other Ressources.

I am grateful for every help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文