marq
marq

Reputation: 828

Using an explicit localization expression for a page title?

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?

Upvotes: 1

Views: 1631

Answers (2)

Chris Marais
Chris Marais

Reputation: 411

You can also use either

Page.Title = Resources.MyResource.StringId;

or

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

Upvotes: 3

Robin Agrahari
Robin Agrahari

Reputation: 817

simply in the page load event write

Page.Title="any String u want";

Upvotes: -1

Related Questions