public static MvcHtmlString GridButtonAction(this HtmlHelper helper, GridButtonWindowActionParameters parameters)
        {
            var          idToInsert    = parameters.Name;
            const string classToInsert = "gridButtonWindow";
            var          winName       = parameters.WindowName.ToUpper().EndsWith("WINDOW") ? parameters.WindowName : parameters.WindowName + "Window";
            var          attrToInsert  = String.Format("data-window='{0}' data-action='{1}'",
                                                       winName, UrlHelper.GenerateContentUrl("~/" + parameters.Controller + "/" + parameters.Action + "?" +
                                                                                             SerializeToQueryString(parameters.RouteValues),
                                                                                             helper.ViewContext.HttpContext));

            var str = GridButtonHTML.GetHTMLForButtonType(parameters.GridButtonType, parameters.ButtonIcon);

            str = HTMLHelper.AddIdToHtmlElement(str, idToInsert);
            str = HTMLHelper.AddClassToHtmlElement(str, classToInsert);
            str = HTMLHelper.AddAttributesToHtmlElement(str, attrToInsert);

            return(new MvcHtmlString(str));
        }
        public static MvcHtmlString GridButtonAction(this HtmlHelper helper, GridButtonActionParameters parameters)
        {
            var idToInsert     = parameters.Name;
            var classToInsert  = "gridButtonToController";
            var actionComplete = "";

            if (String.IsNullOrEmpty(parameters.UrlAction))
            {
                actionComplete = UrlHelper.GenerateContentUrl("~/" + parameters.Controller + "/" + parameters.Action + "?" +
                                                              SerializeToQueryString(parameters.RouteValues),
                                                              helper.ViewContext.HttpContext);
            }
            else
            {
                actionComplete = parameters.UrlAction;
            }

            var str = GridButtonHTML.GetHTMLForButtonType(parameters.GridButtonType, parameters.ButtonIcon, actionComplete);

            str = HTMLHelper.AddIdToHtmlElement(str, idToInsert);
            str = HTMLHelper.AddClassToHtmlElement(str, classToInsert);

            return(new MvcHtmlString(str));
        }