Reputation: 2970
My project ClaimTrax.Web
has a folder 'App_GlobalResources'
which has resource file 'DisplayMessages.resx'
in which I have Name as 'UserLockMessage'
and value as
'Your account has been locked. Please contact Admin.'....
My namespace and class and method wherein I want string message from 'DisplayMessages.resx'
is below:-
namespace ClaimTrax.Business.Laserfiche
{
public sealed class LFAPIInterface
{
public string CheckLoginAttempts(User user, string message)
{
What namespace if needed should I add and how to get the message from reource file 'DisplayMessages.resx'
which is in folder 'App_GlobalResources'
in same project?
Thanks in advance....
Upvotes: 2
Views: 54
Reputation: 2623
This should do the job:
string usrmsg = ClaimTrax.Business.Laserfiche.Properties.Resources.UserLockMessage;
Upvotes: 1