LabelExtensions.cs 713 B

1234567891011121314151617181920212223
  1. using EMIS.Utility;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Mvc;
  7. namespace EMIS.Web.Controls
  8. {
  9. public static class LabelExtensions
  10. {
  11. /// <summary>
  12. /// 读取资源文件以呈现字符串,当应用于不同客户,并且这些客户对同一个数据有不同称呼时需要使用
  13. /// </summary>
  14. /// <param name="htmlHelper"></param>
  15. /// <param name="labelName">资源标签名</param>
  16. /// <returns></returns>
  17. public static MvcHtmlString RSLabel(this HtmlHelper htmlHelper, string labelName)
  18. {
  19. return MvcHtmlString.Create(RSL.Get(labelName));
  20. }
  21. }
  22. }