gpt4 book ai didi

c# - 打开页面新标签并刷新当前页面

转载 作者:行者123 更新时间:2023-11-30 12:46:23 25 4
gpt4 key购买 nike

Page.ClientScript.RegisterStartupScript(Page.GetType(), null, "window.open('bill_reciept.aspx?Parameter=" + txt_billNo.Text + "', '_newtab')", true); 

这是标签页中的新页面

Page.ClientScript.RegisterStartupScript(Page.GetType(), null, "window.open('customerReg.aspx', '_self')", true);

要刷新的旧页面

新页面正在选项卡中打开,但旧页面无法刷新或在同一选项卡中的新页面中打开

最佳答案

试试这个:

您可以使用以下代码在同一页面上重定向:

Response.Redirect(Request.RawUrl);    

如果你想在客户端而不是服务器端做,使用

 javascript:document.location.reload() 

window.location.href= window.location; 

我已经引用了以下链接,您也可以这样做:

http://forums.asp.net/t/1310604.aspx?+How+to+refresh+the+page+programatically+by+C+

关于c# - 打开页面新标签并刷新当前页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22370371/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com