Refresh page periodically in C#.Net/ASP.Net


In this article we are going to discuss about how to refresh the page periodically using c#.code or html meta tag.


Some time we face the situation like represhing the page periodiclly. In this article i am going to explain about refreshing the page periodically using html and C# code. In HTML to do this periodic refresh we are using the meta tag with the attribute http-equiv=”refresh”. Below is the HTML code for refreshing the page.

HTML Code:

        <meta id=”RefreshPeriod”runat=”server”http-equiv=”refresh”content=”10″/>

In the above code content=”10″ indicates that the page refreshes 10 seconds once.

Otherwise we can do it using c# code in code behind file.Code for refrshing the page is given below.

protected void Page_Load(object sender, EventArgse)
    // Set refresh period in seconds
    RefreshPeriod.Content = “5”;

Do you like this article. Then comment here or share with your friends. Or like our facebook page.

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!