How do I access GetGlobalResourceObject function from a class that is not a page?

asp.net, httpcontext, resources

Solution

Answer: Yes, as following pseudo:

Resources.<The name of the resources file name>.<your resource key>;

Example:

lblTitle.Text = Resources.MySettings.WebsiteTitle;

`Resources` is an Visual-Studio auto generated namespace that exposes all the global resource classes and props in the project.

Problem

I have a class in my asp.net proj, I would like to get access GetGlobalResourceObject (that page exposes), from anywhere in the site, possible? In other words I wanna access the global resources from a class that is not a page I don't care how.

Original source