private void SetPageTitle() { //TODO: Uncomment when site map //SiteMapNode currentNode = SiteMap.CurrentNode; //if (currentNode != null) //{ // Page.Header.Title = currentNode.Title; //} //else //{ // Page.Header.Title = string.Empty; //} JavaScriptBuilder loadScript = ((PageEx)Page).JavaScriptOnLoad; loadScript.AppendLine("\n window.parent.document.title='KB :: " + JavaScriptBuilder.ApplyEscapeSequences(Page.Header.Title) + "'; \n"); loadScript.AppendLine(SiteJavaScriptLibrary.RestorFrameScript); }
/// <summary> /// Registers the java scripts. /// </summary> private void RegisterJavaScripts() { OnRegisterJavaScripts(); PageIncludes.InitPage(this); //ClientScript.RegisterClientScriptInclude("JScript.js", AppSettings.ApplicationJsPath + "JScript.js"); if (!string.IsNullOrEmpty(DefaultButton)) { onLoadScriptBuilder.AppendLine(string.Format("_defaultButtonID='{0}';", DefaultButton)); } var loadScript = onLoadScriptBuilder.GetScript(); if (!string.IsNullOrEmpty(loadScript)) { RegisterStartupScript(loadScript); } ScriptManager.RegisterClientScriptBlock(Page, typeof(PageEx), "PageScript", jScript.ToString(), true); }