Use ASP.NET Resource strings from within javascript files

后端 未结 9 1714
迷失自我
迷失自我 2020-12-13 01:02

How would one get resx resource strings into javascript code stored in a .js file?

If your javascript is in a script block in the markup, you can use this syntax:

9条回答
  •  感动是毒
    2020-12-13 01:22

    I the brown field application I'm working on we have an xslt that transforms the resx file into a javascript file as part of the build process. This works well since this is a web application. I'm not sure if the original question is a web application.

提交回复
热议问题