jQuery中的.resx文件 [英] .resx file in Jquery

查看:56
本文介绍了jQuery中的.resx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想知道是否可以将Resource文件转换为saperate .JS文件.对于前.在.cs文件中,我可以像-
一样使用它
alert(''@Resources.NamesofResourceFile.Variable'')
这将显示警告,并带有来自资源文件的文本.

以同样的方式,我想使用资源文件到.js文件中,但是没有用.我正在关注-

Hi,

I am wondering to know if we can call Resource file into saperate .JS file. for ex. in .cs file I can use it like -

alert(''@Resources.NamesofResourceFile.Variable'')
this will show alert with text coming from resource file.

In the same way I want to use resource file into .js file but didn''t working. I am doing following -

$.processdialog.prompt("<div style="text-align: center; vertical-align: middle;margin-removed 16px"><div> " + '<%= Resources.NewCustomers.Wait %>'+ "</div><img src='/images/loading.gif' alt='Please Wait' /></div>", { width: 260 });


我以不同的方式使用了上面的粗体线,但是没有一个检索值.

任何帮助
Kamlesh


I used above bold line in different way but none of the is retriving the value.

Any help
Kamlesh

推荐答案

.processdialog.prompt(" text-align:center; vertical-align:middle; margin-removed 16px > ;< div>" + &%;%= Resources.NewCustomers.Wait%> ; ' + " ,{宽度:
.processdialog.prompt("<div style="text-align: center; vertical-align: middle;margin-removed 16px"><div> " + '<%= Resources.NewCustomers.Wait %>'+ "</div><img src='/images/loading.gif' alt='Please Wait' /></div>", { width: 260 });


我以不同的方式使用了上面的粗体线,但是没有一个检索值.

任何帮助
Kamlesh


I used above bold line in different way but none of the is retriving the value.

Any help
Kamlesh


RESX为xml格式,因此可以打开并解析它.个人而言,我将用C#代码对其进行解析(因为文件无论如何都必须在服务器端).

编辑(在您的评论后)===========================

如果必须显示文件的文本,只需将其作为文本文件打开并显示.
RESX is in xml format, so yes, you can open it and parse it. PERSONALLY, I would parse it in the C# code (since the files would have to be on the server side anyway).

EDIT (after your comment) ============================

If you have to show the text of the file, just open it as a text file, and display it.


这篇关于jQuery中的.resx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆