admin管理员组文章数量:1394409
I want to close current tab from code behind as i want to perform some operation so after performing some operation it should be closed so please help me.. thanks in advance.
I tried it with
function close_window() {
if (confirm("Close Window?")) {
close();
}
}
but not able to call this method from code behind.
I want to close current tab from code behind as i want to perform some operation so after performing some operation it should be closed so please help me.. thanks in advance.
I tried it with
function close_window() {
if (confirm("Close Window?")) {
close();
}
}
but not able to call this method from code behind.
Share Improve this question edited Mar 5, 2012 at 10:19 svick 245k53 gold badges405 silver badges531 bronze badges asked Mar 5, 2012 at 10:16 milind talatimilind talati 131 silver badge3 bronze badges 02 Answers
Reset to default 4 string jScript;
jScript="<script>close_window();</script>";
ClientScript.RegisterClientScriptBlock(this.GetType(),"keyClientBlock", jScript);
I know this is an old thread, but I thought I would post what worked for me. Tested and working in .NET 3.5 & 4.0.
Response.Write("<script>window.close();</script>");
本文标签: cHow to close a tab from code behindStack Overflow
版权声明:本文标题:c# - How to close a tab from code behind? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744623841a2616192.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论