Reputation: 393
I have a page with a button that if clicked on it, a function is called that creates a pdf and it is opened in a new tab. Now after clicking this button, I want to reload the current page then pdf file open in a new window. How can I do this action without change request url?
I try to use below code but it change the url of new tab:
if (Request.UrlReferrer != null) Response.Redirect(Request.UrlReferrer.ToString());
Upvotes: 3
Views: 572
Reputation: 251
I think you can use a simple JavaScript to reload current page completely
Have a look at this answer:
How to reload a page using JavaScript
Upvotes: 1