Пример #1
0
        protected void SetScript()
        {
            if (ButtonAttributes.Count > 0)
            {
                Attributes["buttons"] = ButtonAttributes.RenderOptions();
            }
            var script = @"bootbox." + type.ToString().ToLower() + "(" + this.RenderOptions() + ");";

            Script = script;
            if (!HttpContext.Current.Request.RequestContext.HttpContext.Request.IsAjaxRequest() && htmlHelper == null)
            {
                SetScriptTag();
            }
        }
Пример #2
0
        protected void SetScript()
        {
            if (ButtonAttributes.Count > 0)
            {
                Attributes["buttons"] = ButtonAttributes.RenderOptions();
            }

            Script = $"bootbox.{type.ToString().ToLower()}({this.RenderOptions()});";

            if (!ComponentUtility.GetHttpContext().Request.IsAjaxRequest() && HtmlHelper == null)
            {
                SetScriptTag();
            }
        }