I have an ashx file which returns a localised message. This is called from an Ajax request. I need to access the Asp.net ResourceManager in the ashx file.
A:
Any resources in the app should be accessible under the Resources namespace.
For a resource file called LocalMessages.en.resx:
ReturnMsg = Resources.LocalMessages.MyAjaxMessage;
For intellisense to work, make sure app has been compiled once to create the Resources objects from resx files.
HectorMac
2010-08-24 12:06:25
A:
Following code worked for me.
HttpContext.GetGlobalResourceObject("classKey", "resourceKey") as string;
Amitabh
2010-08-24 17:16:52