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


C# ViewContext.HtmlHelper方法代码示例

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


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

示例1: RenderItemColumn

 public override IHtmlString RenderItemColumn(ViewContext viewContext)
 {
     var data = (User)DataItem;
     var linkText = "Reset password".Localize();
     var @class = "o-icon password dialog-link";
     return viewContext.HtmlHelper().ActionLink(linkText, "ResetPassword", viewContext.RequestContext.AllRouteValues().Merge("userName", data.UserName), new Dictionary<string, object> { { "class", @class } });
 }
开发者ID:Godoy,项目名称:CMS,代码行数:7,代码来源:User_ResetPassword_GridItemColumn.cs

示例2: RenderItemColumn

        public override IHtmlString RenderItemColumn(ViewContext viewContext)
        {
            var data = (OutgoingQueue)DataItem;
            var linkText = "Logs".Localize();

            return viewContext.HtmlHelper().ActionLink(linkText, "Logs",viewContext.RequestContext.AllRouteValues()
                .Merge("UUID", data.UUID).Merge("return", viewContext.HttpContext.Request.RawUrl));
        }
开发者ID:Godoy,项目名称:CMS,代码行数:8,代码来源:OutgoingLogLinkGridItemColumn.cs

示例3: RenderItemColumn

 public override IHtmlString RenderItemColumn(ViewContext viewContext)
 {
     var data = (PendingWorkflowItem)DataItem;
     var linkText = "Edit".Localize();
     var @class = "dialog-link";
     if (!string.IsNullOrEmpty(this.GridColumn.PropertyName))
     {
         linkText = this.PropertyValue == null ? "" : PropertyValue.ToString();
     }
     else
     {
         @class = "o-icon edit " + @class;
     }
     return viewContext.HtmlHelper().ActionLink(linkText, "Edit", viewContext.RequestContext.AllRouteValues()
         .Merge("Controller", "TextContent").Merge("FolderName", data.UUID).Merge("UUID", data.UUID)
         , new Dictionary<string, object> { { "class", @class } });
 }
开发者ID:Godoy,项目名称:CMS,代码行数:17,代码来源:PendingWorflowItem_Edit_GridItemColumn.cs

示例4: RenderItemColumn

        public override IHtmlString RenderItemColumn(ViewContext viewContext)
        {
            if (DataItem is IIdentifiable)
            {
                var data = (IIdentifiable)DataItem;
                var linkText = "Edit".Localize();
                var @class = Class;
                if (!string.IsNullOrEmpty(this.GridColumn.PropertyName))
                {
                    linkText = this.PropertyValue == null ? "" : PropertyValue.ToString();
                }
                else
                {
                    @class = "o-icon edit " + @class;
                }
                return viewContext.HtmlHelper().ActionLink(linkText, "Edit", viewContext.RequestContext.AllRouteValues().Merge("UUID", data.UUID), new Dictionary<string, object> { { "class", @class } });
            }

            return new HtmlString("");
        }
开发者ID:Godoy,项目名称:CMS,代码行数:20,代码来源:DialogEditGridActionItemColumn.cs

示例5: RenderItemColumn

 public override IHtmlString RenderItemColumn(ViewContext viewContext)
 {
     if (DataItem is Kooboo.CMS.Common.Persistence.Non_Relational.IIdentifiable)
     {
         var data = (Kooboo.CMS.Common.Persistence.Non_Relational.IIdentifiable)DataItem;
         var linkText = string.Empty;
         var @class = string.Empty;
         if (!string.IsNullOrEmpty(this.GridColumn.PropertyName))
         {
             linkText = this.PropertyValue == null ? "" : PropertyValue.ToString();
         }
         else
         {
             @class = "o-icon " + @class;
         }
         return viewContext.HtmlHelper().ActionLink(linkText, "Detail", viewContext.RequestContext.AllRouteValues()
             .Merge("UUID", data.UUID).Merge("return", viewContext.HttpContext.Request.RawUrl)
             , new Dictionary<string, object> { { "class", @class } });
     }
     return new MvcHtmlString(string.Empty);
 }
开发者ID:Godoy,项目名称:CMS,代码行数:21,代码来源:DetailGridItemColumn.cs


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