Problem catching .resx file key

0

I have NullReferenceException in this line:

string from = HttpContext.GetGlobalResourceObject("globalization", "mail_from").ToString();

Because it is not finding the .resx file, so it does not find "mail_from" and gives ToString() to null.

I have the file in the App_GlobalResources folder, called globalization.pt-BR.resx.

    
asked by anonymous 18.04.2017 / 19:46

1 answer

2

I do not know why this does not work, but you can try it in the default way

Resources.globalization.ResourceManager.GetString("mail_from‌​")
    
18.04.2017 / 21:18