开发者

How can I get local resources in a controller in ASP.NET MVC?

I know I can use the namespace Resources to get resources within App_GlobalResources but how do I get local resources within a controller?

Example, a folder in Views folder called Misc, with a page.aspx, and a App_LocalResources folder with the file page.aspx开发者_运维问答.ascx.


One way to do is: HttpContext.GetLocalResourceObject("~/Views/FOLDER/VIEW.cshtml", "KEY").ToString();

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜