在后台调用JavaScript打开新页面

public static void OpenWindowInNewPage(Page curPage, string destUrl)
    {
        string scriptString = string.Format("<script language='JavaScript'>window.open('" + "{0}" + "','" + "','toolbar=no,menubar=no,status=yes,location=no, resizable=yes,scrollbars=no');<", destUrl);
        scriptString += "/";
        scriptString += "script>";
        if (!curPage.IsStartupScriptRegistered("Startup"))
        {
            curPage.RegisterStartupScript("Startup", scriptString);
        }
    }

 

OpenWindowInNewPage(this, url);


posted @ 2008-07-14 19:18  洗碗心得  阅读(2621)  评论(0编辑  收藏  举报