what’s the difference between assigning text to a Label using meta:ResourceKey and
Text="<%$ Resources:MyKey %>". i get the same results using both methods.
what’s the difference between assigning text to a Label using meta:ResourceKey and Text=<%$ Resources:MyKey
Share
The first form is called an implicit resource expression, the second form is an explicit resource expression.
They may give the same result for a single property. However, the implicit
meta:ResourceKeyhas some advantages in that if there are several resourced property definitions in the local resource file, all of them will be applied with just that single declaration. The disadvantage is that it has to be from the “local” resource file, i.e. the resource file for that page.If you use the explicit property assignment of
Text="<%$ Resources:MyKey %>", you’ll need to add that code for every property value you want to fetch from the resource file. However, the advantage is that you can specify a filename parameter and fetch the resource from a global resource file.Here’s a reference.