コード例 #1
0
 /// <summary>
 /// Shows the alert.
 /// </summary>
 /// <param name="message">The message.</param>
 public void ShowAlert(string message)
 {
     ScriptManager.RegisterStartupScript(Page, typeof(PageEx),
                                         message.GetHashCode().ToString(),
                                         "\n alert('" + JavaScriptBuilder.ApplyEscapeSequences(message) +
                                         "'); \n",
                                         true);
 }
コード例 #2
0
    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);
    }