Monday 17 December 2012

Auto Refresh webpage after some time in asp.net.


In this post I will explain you how to auto refresh web page in asp.net.

Description:-

AutoRefresh  means web page reload the same page after some time. You have seen  google news is auto refresh after some time. If we change something in web-page then it automatically load the data when the will refresh.
There are two methods to refresh the page in asp.net.

First:-
You can add the following code in the header section in web-page in asp.net.
<meta http-equiv="refresh" content="10" />

Where 10 refers no of seconds after that page will refresh.
 This code will be also work for java,php ,perl and  HTML .

Second:-  Server side code
You can add thefollowing code in page-load function in code behind page in asp.net.

Response.AddHeader("refresh","10");

No comments:

Post a Comment

Note: only a member of this blog may post a comment.