negin motalebi
negin motalebi

Reputation: 393

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

Upvotes: 3

Views: 572

Answers (2)

mayank arora
mayank arora

Reputation: 21

You can use Request.UrlReferrer.ToString()

Upvotes: 0

Mehdi Payervand
Mehdi Payervand

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

Related Questions