在设计时如何在网格视图中全局分配资源
问题描述:
大家好,
如何在设计时为网格视图全局化资源.
我使用label --- Text =<%$ Resources:Filename,label1%>.
我想像这样的网格视图请引导我.
Hi All,
how to global resources for grid view in design time.
i use for label---Text="<%$ Resources:Filename,label1 %>.
i want same like this for grid view pls guid me. its very urgent.
答
资源:文件名,标签1%>.
我想像这样的网格视图请引导我.非常紧急.
Resources:Filename,label1 %>.
i want same like this for grid view pls guid me. its very urgent.
您可以使用下一个方法:
You can use the next method:
public string GetResourceString(string key)
{
Object obj = HttpContext.GetGlobalResourceObject("YourResourceFileName", key);
if (obj == null)
return key;
return obj.ToString();
}