当前位置: 首页>>代码示例>>C#>>正文


C# UrlHelper.EmbeddedResource方法代码示例

本文整理汇总了C#中System.Web.Mvc.UrlHelper.EmbeddedResource方法的典型用法代码示例。如果您正苦于以下问题:C# UrlHelper.EmbeddedResource方法的具体用法?C# UrlHelper.EmbeddedResource怎么用?C# UrlHelper.EmbeddedResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.Mvc.UrlHelper的用法示例。


在下文中一共展示了UrlHelper.EmbeddedResource方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CodeMirrorScriptReferences

        /// <summary>
        /// Adds script references required by the Sitefinity's CodeMirror component.
        /// </summary>
        /// <param name="helper">The helper.</param>
        /// <returns>
        /// MvcHtmlString
        /// </returns>
        public static MvcHtmlString CodeMirrorScriptReferences(this HtmlHelper helper)
        {
            var result = new StringBuilder();
            var urlHelper = new UrlHelper(helper.ViewContext.HttpContext.Request.RequestContext);
            result.Append(ResourceHelper.StyleSheet(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.codemirror.css")).ToHtmlString());
            result.Append(ResourceHelper.StyleSheet(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.Theme.default.css")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.codemirror.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.Mode.htmlmixed.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.Mode.xml.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.Mode.css.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource(typeof(Telerik.Sitefinity.Resources.Reference).FullName, "Telerik.Sitefinity.Resources.Scripts.CodeMirror.Mode.javascript.js")).ToHtmlString());

            return MvcHtmlString.Create(result.ToString());
        }
开发者ID:RifasRazick,项目名称:feather,代码行数:21,代码来源:ResourceHelper.cs

示例2: QueryBuilderScriptReferences

        /// <summary>
        /// Adds script references required by the Sitefinity's QueryBuilder component.
        /// </summary>
        /// <param name="helper">The helper.</param>
        /// <returns>
        /// MvcHtmlString
        /// </returns>
        public static MvcHtmlString QueryBuilderScriptReferences(this HtmlHelper helper)
        {
            var result = new StringBuilder();
            var urlHelper = new UrlHelper(helper.ViewContext.HttpContext.Request.RequestContext);
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource("Telerik.Sitefinity.Web.UI.QueryBuilder", "Telerik.Sitefinity.Web.UI.QueryBuilder.Scripts.QueryData.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource("Telerik.Sitefinity.Web.UI.QueryBuilder", "Telerik.Sitefinity.Web.UI.QueryBuilder.Scripts.QueryDataItem.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource("Telerik.Sitefinity.Web.UI.QueryBuilder", "Telerik.Sitefinity.Web.UI.QueryBuilder.Scripts.QueryItem.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource("Telerik.Sitefinity.Web.UI.QueryBuilder", "Telerik.Sitefinity.Web.UI.QueryBuilder.Scripts.QueryGroup.js")).ToHtmlString());
            result.Append(ResourceHelper.Script(helper, urlHelper.EmbeddedResource("Telerik.Sitefinity.Web.UI.QueryBuilder", "Telerik.Sitefinity.Web.UI.QueryBuilder.Scripts.QueryBuilder.js")).ToHtmlString());

            return MvcHtmlString.Create(result.ToString());
        }
开发者ID:RifasRazick,项目名称:feather,代码行数:19,代码来源:ResourceHelper.cs


注:本文中的System.Web.Mvc.UrlHelper.EmbeddedResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。