A Bright Worker
A Bright Worker

Reputation: 1318

ASP.NET meta:resourcekey

I want to use two meta:resourcekey in single control is it possible?

for example "< asp:LinkButton meta:resourcekey="ImageUrlKey1" meta:resourcekey="ToolTipKey1" >"

Thanks, Piyush

Upvotes: 2

Views: 8303

Answers (1)

M4N
M4N

Reputation: 96551

I guess you have two possibilities:


When using implicit localization you define several key/value pairs for the localized properties of the LinkButton1 in your resource file, e.g. for:

LinkButton1.ImageUrl
LinkButton1.ToolTip

and then use only one meta:resourcekey attribute:

<asp:LinkButton meta:resourcekey="LinkButton1" ... />

Or you use explicit localization instead, i.e. which uses a different syntax instead of meta:resourcekey:

<asp:LinkButton
  ImageUrl="<%$ Resources:WebResources, Button1ImageUrl %>"
  ToolTip="<%$ Resources:WebResources, Button1ToolTip %>" />

In any case, have a look at this article, which explains it in detail.

Upvotes: 6

Related Questions