Refresh your ASP.net page automatically

For the websites that is having frequently updated content, you may need to refresh the page in an interval of time, use following code for doing this.


Response.AppendHeader("Refresh", "60; URL=Default.aspx");


Above code will refresh the page in 60 seconds


Comments

Author: venkatesan.M11 Nov 2009 Member Level: Gold   Points : 2

If you use the above code ?

in the master page so it will refresh for every 60 second, Suppose the user want to type or fill some forms there he take more than a min so if you use this code it will reset all the values entered by user ??

If you provide some background process or somthing without affecting the user interacting with the page /

Author: Prajeesh12 Nov 2009 Member Level: Gold   Points : 1

Hi venkatesan,
We are no supposed to use above code for pages containing any form, rather we can use the code to display frequently changing data, alternatively you can use asp.net ajax to achieve this by using an update panel and timer control.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: