Alaa Alweish
Alaa Alweish

Reputation: 9084

fully reload a page using asynchronous ajax or jquery

I have an ASP.net page where the visitor is doing tasks that will generate JavaScript in run-time to be registered in the page, the following ASP.net functions are used to register the JS code:

Page.ClientScript.RegisterHiddenField
Page.ClientScript.RegisterStartupScript
Page.ClientScript.RegisterClientScriptBlock

the generated code is very hard to be maintain and the page is fully in ASP.net ajax and JS,

And a refresh button is there to reload the page or to clear everything (just like you press F5) is there any silent way to reload the whole page? (asynchronous reload, without page flicker (Ajax))

Upvotes: 1

Views: 2790

Answers (2)

Shishir Arora
Shishir Arora

Reputation: 5923

Please use location.reload(true); to reload the entire page from the server. use false if u want to reload from cache. And with ajax u can use empty url and context as document.body to reload the complete body of page

Upvotes: 0

TheodoreV
TheodoreV

Reputation: 304

What do you mean with "silent way"? You can refresh the whole page using

location.reload();

Upvotes: 2

Related Questions