コード例 #1
0
        public static IHtmlString GridAddButton(this HtmlHelper helper, EntityType entityType)
        {
            var builder = new StringBuilder();

            var button = new TagBuilder("a");

            button.AddCssClass("float");
            button.Attributes.Add("href", UrlGenerator.CreatePage(entityType));

            var icon = new TagBuilder("i");

            icon.AddCssClass("fa fa-plus fa-2x fab-button");
            button.InnerHtml = icon.ToString();

            builder.AppendLine(button.ToString());
            return(new HtmlString(builder.ToString()));
        }