在我的web应用程序中,我将所有JavaScript作为js文件包含在程序集中,并将它们添加到页面中,使用ClientScriptManager.GetWebResourceUrl()
。但是,在我的一些js文件中,我引用了其他静态资源,如图像url。我也想制作这些装配资源。有没有办法标记对资源的引用?例如引用来自c#中其他资源的嵌入式资源
this.drophint = document.createElement('img');
this.drophint.src = '/_layouts/images/dragdrophint.gif';
可能会成为类似:
this.drophint = document.createElement('img');
this.drophint.src = '{resource:assembly.location.dragdrophint.gif}';