/// <summary> /// Registers a client script block in the page. /// </summary> public void RegisterJsBlock(HtmlTextWriter writer, string key, string script, bool addScriptTags, bool noCombin) { if (IsScriptRended(key)) { return; } SetScriptRended(key); if (addScriptTags) { if (!noCombin && JContext.Current.Area.CombineJs) { Scripts.AddBlock(script); return; } else { script = string.Format("<script type='text/javascript'>{0}</script>", script); } } writer.Write(script); }