private string LiWithLink(string text, object routeValues, string liCssClass = null) { // Wrapper TagBuilder li = new TagBuilder("li"); li.AddCssClass(liCssClass); li.AddCssClass("page-item"); // link var a = _ajaxHelper. Button(_actionName, _controllerName, _areaName) .SetText(text) .IsLinkBtn(true) .SetRouteValues(routeValues) .SetUpdateTargetId(UpdateTargetId) .RemoveAllCssClass() .AddCssClass("page-link"); li.InnerHtml = a.ToString(); return(li.ToString()); }
public ButtonControlAjax Button_Edit <TModel>(AjaxHelper <IEnumerable <TModel> > helper, string rowId) { // Data var routeValues = new { id = rowId }; // Set data var obj = helper.Button( ConstantHelper.ActionNameEdit, ControllerName, ConstantHelper.AreaNameManageData) .SetUpdateTargetId(ConstantHelper.MidModalContentId) .SetRouteValues(routeValues) .AddCssClass("btn-round") .SetOnSuccessFun(GenerateOpenModalJSCode(ModalOptions.MidiumSize, true)); // Set style obj = obj.SetMaterialIcon("mode_edit") .SetColor(ColorOptions.Info) .IsLinkBtn(true); return(obj); }