对页面标题使用显式本地化表达式?
我试图获得页面标题的显式本地化表达式,但似乎无法弄清楚如何实现,并且谷歌搜索什么也没有出现。
有了控件,一切就变得既美好又简单:
<asp:literal runat="server" text="<%$ Resources:MyResource, StringId %>" />
但是如何为页面标题做到这一点呢?我尝试在页面指令中指定它,但这当然不起作用:
<%@ Page Title="<%$ Resources:MyResource, StringId %>" ...
有办法做到这一点吗?或者这根本不可能?
I am trying to get an explicit localization expression for a page title, but can't seem to figure out how, and a google search comes up with nothing.
With a control, it's nice and easy:
<asp:literal runat="server" text="<%$ Resources:MyResource, StringId %>" />
But how does one do this for the page title? I've tried specifying it in the page directive, but that of course doesn't work:
<%@ Page Title="<%$ Resources:MyResource, StringId %>" ...
Is there a way to do this? Or is it simply not possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您也可以使用
或
You can also use either
or
只需在页面加载事件中写入
simply in the page load event write