2014-02-13 127 views
0

我无法关闭使用C#代码的当前asp.net页面。我试过了:无法关闭当前窗口

ClientScript.RegisterClientScriptBlock(Page.GetType(), 
             "script", 
             "window.close();", 
             true); 

我没有收到任何错误,但它不起作用。

+0

我没有得到任何错误 – John

+0

试过,但没有运气:( – John

+0

你有更新面板吗? – Arion

回答

1

试试这个

ClientScript.RegisterStartupScript(typeof(Page), 
    "closePage", 
    "window.close();", 
    true); 
+0

这也不起作用 – John

+0

让我们尝试作弊。使用这个:Response.Write(“”); OR Respose.Write(“”); – Dumisani