I want to Make my custom htmlhelper method to render something like jtable using MVC5 I prepared my simple method to take Action Name and Controller name then fetch Action and take returning result to render values in table how to execute this action by its route ? I searched before asking but didn't find what I want suppose my action just return array of strings this my custom method

 public static IHtmlString Grid(this HtmlHelper helper,stringActionName,string ControllerName)
            string Route = ControllerName+ "/" + ActionName;
            //I need to Access this Action using Route    

            TagBuilder tble = new TagBuilder("table");
            tble.InnerHtml = "<thead><tr><td colspan='2'>"+text+"<td></tr></thead><tbody></tbody>";
            tble.AddCssClass("table table-bordered table-hover table-striped");
            return new HtmlString(tble.ToString());

Related posts

Recent Viewed