在C#的后台代码中写入
this.ClientScript.RegisterStartupScript(typeof(Page),"JavaScript","<script>window.close('StateChangeApply.aspx','','left=0,top=0,scrollbars=yes,width=600,height=500')</script>");
可以防止页面变化
本文介绍了一种使用 C# 在后台代码中关闭特定窗口的方法。通过注册启动脚本,可以有效地控制页面的行为,例如调整弹出窗口的位置和大小。
在C#的后台代码中写入
this.ClientScript.RegisterStartupScript(typeof(Page),"JavaScript","<script>window.close('StateChangeApply.aspx','','left=0,top=0,scrollbars=yes,width=600,height=500')</script>");
可以防止页面变化

被折叠的 条评论
为什么被折叠?