public override MvcHtmlString ToHtml(HtmlHelper helper) { var a = new HtmlTag("button").Id(this.Id) .Class("btn btn-default btn-help") .Class(HelpLogic.GetQueryHelp(QueryName).HasEntity ? "hasItems" : null) .Attr("type", "button") .SetInnerText("?"); var query = HelpLogic.GetQueryHelpService(this.QueryName); var jsType = new { QueryName = QueryUtils.GetKey(query.QueryName), Info = query.Info, Columns = query.Columns, }; var result = new HtmlTag("div").Class("btn-group").InnerHtml(a).ToHtml(); result = result.Concat(helper.ScriptCss("~/Help/Content/helpWidget.css")); result = result.Concat(MvcHtmlString.Create("<script>$('#" + this.Id + "').on('mouseup', function(event){ if(event.which == 3) return; " + HelpClient.WidgetModule["searchClick"](JsFunction.This, this.Prefix, jsType, helper.UrlHelper().Action((HelpController c) => c.ComplexColumns())).ToString() + " })</script>")); return(result); }