C# 打开“页面新建”选项卡并刷新当前页面

C# 打开“页面新建”选项卡并刷新当前页面,c#,javascript,asp.net,C#,Javascript,Asp.net,这是选项卡中的新页面 Page.ClientScript.RegisterStartupScript(Page.GetType(), null, "window.open('bill_reciept.aspx?Parameter=" + txt_billNo.Text + "', '_newtab')", true); 这是要刷新的旧页 新页面将在选项卡中打开,但旧页面无法刷新或在同一选项卡的新页面中打开 您可以使用以下代码在同一页面上重定向: Page.ClientScript.Regis

这是选项卡中的新页面

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);    

我参考了以下链接,您也可以这样做:


执行以下操作

window.location.href= window.location; 
调用javascript方法,如下所示

window.location.href= window.location; 

这将在新选项卡中打开页面,在功能结束时,您必须重新加载位置…

第二次使用location.reload
var windowObjectReference;

function openRequestedPopup() {
    windowObjectReference = window.open("CMS_1.aspx",
          "DescriptiveWindowName",
          "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
}