开发者

Using an explicit localization expression for a page title?

开发者 https://www.devze.com 2023-02-24 12:29 出处:网络
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.

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 co开发者_如何学Gontrol, 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?


You can also use either

Page.Title = Resources.MyResource.StringId;

or

<title><%= Resources.MyResource.StringId %></title>


simply in the page load event write

Page.Title="any String u want";
0

精彩评论

暂无评论...
验证码 换一张
取 消