hima
hima

Reputation: 53

reading resource file strings from a .resx file in .cs file

My solution has Messages.resx file under App_GlobalResources in my solution. Everytime i create a string and give a value to the string

internal static string Alert_EnterUserName { get { return ResourceManager.GetString("Alert_EnterUserName", resourceCulture); } }

is created automatically. (resource generator)

I want to use these strings in my cs file. Can anybody help me on this?

Thanks

Upvotes: 0

Views: 730

Answers (1)

hima
hima

Reputation: 53

figured it out myself:

var = HttpContext.GetGlobalResourceObject(“Resourcefilename”, “resourcekey″).ToString();

Upvotes: 3

Related Questions