开发者

reading Resource file using GetGlobalResourceObject

开发者 https://www.devze.com 2023-02-17 15:44 出处:网络
I have two projects in vs2010. one sharepoint which deplyes a Resource file (AppGlobalResource). When I use the following code in the sharepoint project, it runs well:

I have two projects in vs2010. one sharepoint which deplyes a Resource file (AppGlobalResource).

When I use the following code in the sharepoint project, it runs well:

public static string GetResourceString(string messageCode)
        {

                var text = System.Web.HttpContext.GetGlobalResourceObject(ResourceFiles.Default, messageCode);
          开发者_StackOverflow中文版      return text.ToString();

        }

However if I use the C# code (which is included as reference in the sharepoint project) it does not work

0

精彩评论

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