解决方法
Meta:resourcekey语法允许对隐式资源表达式使用声明性语法。在将站点本地化以供国际使用时使用。由于Quickstarts(下面链接)解释,这些类型的表达式链接到位于App_LocalResources文件夹中的.resx文件。
这种表达式的好处是它可以为.resx文件中定义的单个控件使用多个属性,而不是ASPX本身。
例如,取下面的标签:
- <asp:Label ID="myLabel" runat="server" Text="This text is localizable" Meta:resourcekey="myLabelResource1">
- </asp:Label>
此页面的resx文件可能包含附加到标签的多个属性的数据,例如:
- <data name="myLabelResource1.Font-Name">
- <value xml:space="preserve">Default Font name</value>
- </data>
- <data name="myLabelResource1.Text">
- <value xml:space="preserve">Text in default language.</value>
- </data>
- <data name="myLabelResource1.ToolTip">
- <value>Tooltip in default language.</value>
- </data>
The ASP.NET quickstarts提供了一个伟大的底漆,如果你想了解的概念。