进入全球的.resx在ASP.Net查看页面文件 [英] Access Global .resx file in ASP.Net View Page

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

问题描述

我目前正在建设中的.NET Framework 3.5版本,我有我试图在Web应用程序访问资源(的.resx)文件。我已经暴露了的.resx性质为公共访问修饰符和我能够在控制器中的文件或其他文件的.cs访问Web应用程序这些属性。我的问题是:是否可以访问我的看法页面内的名称/值对?我想要做这样的事情...

I am currently building in Version 3.5 of the .Net framework and I have a resource (.resx) file that I am trying to access in a web application. I have exposed the .resx properties as public access modifiers and am able to access these properties in the controller files or other .cs files in the web app. My question is this: Is it possible to access the name/value pairs within my view page? I'd like to do something like this...

text="<%$ Resources: Namespace.ResourceFileName, NAME %>"

或查看页面其他一些类似的方法。

or some other similar method in the view page.

推荐答案

&LT;%=资源与LT;资源名称方式&gt;&LT;性&gt; %>

<%= Resources.<ResourceName>.<Property> %>

这篇关于进入全球的.resx在ASP.Net查看页面文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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