1

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

Alaa Alweish
  • 8,904
  • 16
  • 57
  • 84
  • Possible Duplicate **[How can I refresh a page with JQuery?](http://stackoverflow.com/questions/5404839/how-can-i-refresh-a-page-with-jquery)** and **[Refresh (reload) a page once using jQuery?](http://stackoverflow.com/questions/2557480/refresh-reload-a-page-once-using-jquery)** – Siva Charan May 26 '12 at 20:04
  • 1
    not duplicated, here the question is for asynchronous reload, without page flicker (Ajax). – Alaa Alweish May 26 '12 at 20:20

2 Answers2

2

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

location.reload();
TheodoreV
  • 304
  • 4
  • 17
0

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

RAS
  • 8,100
  • 16
  • 64
  • 86
Shishir Arora
  • 5,521
  • 4
  • 30
  • 35