Hi it's easy to refresh web-page in Asp.net.
Automatic web page refresh can be implemented in an ASP.NET in ".aspx"
pages by adding some HTML code in the Header Section.
We can simply add following line of code in the Header Section to enable auto refresh in an ASP.NET web page.
<meta http-equiv="refresh" content="30">
Where 30 refers to the number of seconds it will take before refreshing the page.
Also we can redirect to a specific page if we put the URL inside the tag.
<meta http-equiv="refresh" content="30;url=http://www.yahoo.com">
Here,after 30 seconds,page will redirect to "www.yahoo.com" website.
If we want to set the Refresh Time dynamically then that can be done in ASP.NET by adding server side code in the Page_Load event to set it.
We the help of AppendHeader
method of Response object
,we can increase/decrease Refresh-Time as shown below:-
protected void Page_Load(object sender, EventArgs e)
Then after 45 second,page will refresh.