开发者

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

开发者 https://www.devze.com 2023-02-02 20:45 出处:网络
My solution has Messages.resx file under App_GlobalResources in my solution. Everytime i create a string and give a value to the string

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?

Than开发者_C百科ks


figured it out myself:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消