/// <summary> /// Renders the resource. /// </summary> /// <param name="helper">The helper.</param> /// <param name="classKey">The class key.</param> /// <param name="resourceKey">The resource key.</param> public static void RenderResource(this HtmlHelper helper, string classKey, string resourceKey) { string value = ResourceExtensions.ResourceString(helper.ViewContext.HttpContext, classKey, resourceKey); helper.ViewContext.Writer.WriteLine(value); }
/// <summary> /// Resources the specified helper. /// </summary> /// <param name="helper">The helper.</param> /// <param name="classKey">The class key.</param> /// <param name="resourceKey">The resource key.</param> /// <returns></returns> public static MvcHtmlString Resource(this HtmlHelper helper, string classKey, params string[] resourceKey) { return(ResourceExtensions.ResourceString(helper.ViewContext.HttpContext, classKey, string.Join("_", resourceKey)).ToMvcHtmlString()); }