Reputation: 63
Page.ClientScript.RegisterStartupScript(Page.GetType(), null, "window.open('bill_reciept.aspx?Parameter=" + txt_billNo.Text + "', '_newtab')", true);
this is new page in tab
Page.ClientScript.RegisterStartupScript(Page.GetType(), null, "window.open('customerReg.aspx', '_self')", true);
This old page that want to refresh
new page is getting opened in tab but old page cannot refresh or open in a new page in same tab
Upvotes: 1
Views: 3755
Reputation: 819
Do something like below...
Call javascript method like below...
var windowObjectReference;
function openRequestedPopup() {
windowObjectReference = window.open("CMS_1.aspx",
"DescriptiveWindowName",
"menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
}
This will open page in new tab, and in end of function you have to reload location....
Upvotes: 1
Reputation: 509
Try this:
You can redirect on the same page using following code :
Response.Redirect(Request.RawUrl);
If you want to do on clientside and not the server, use
javascript:document.location.reload()
or
window.location.href= window.location;
I have referred following link, you can do the same:
http://forums.asp.net/t/1310604.aspx?+How+to+refresh+the+page+programatically+by+C+
Upvotes: 2