1. Global Resource File and
2. Local Resource File
Global resource file can be read by GetGlobalResourceObject method. This method takes two parameter: resource class and the resource key. The class name associates with the .resx file name that contains global resources. Suppose we want the value of "LoginText" from global resource file, named Resource.resx, then our statement will be like below
GetGlobalResourceObject("Resource", "LoginText");
Local resource file which normally stored in App_LocalResources folder, can be read by GetLocalResourceObject method. GetLocalResourceObject takes a resource name as parameter. so we can get a local resource value by the following way
lblMessage.Text = GetLocalResourceObject("msgInvalidLink").ToString();
Enjoy!
5 comments:
Thanks for sharing this information. It was very helpfull for me.
Hello,
It is very helpful.
thank u so much.
Have a colorful life with endless happiness.
Tamilvanan.k
Software Developers India. Pvt. Ltd.
tamilv@sdi.la
Thanks alot..it helpoed me
thanks alot
Thanks alot
Post a Comment