简体   繁体   中英

Is it possible to reload page Url without change request Url?

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

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

您可以使用 Request.UrlReferrer.ToString()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM