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";
精彩评论