Now here in this tutorial, I’ll explain how to auto refresh webpage in every 10 seconds or any specific time intervals using meta tag in asp.net c# or vb.net.If you feel this tutorial is upto the mark, then kindly check out our other tutorials. We ensure you that those tutorials will be as amazing as this one.
In my previous tutorials, I’d explained how to automatically redirect to a specific url in 10 seconds, how to redirect to a specified url or webpage on button click, gridview inline insert update delete and other more cracking tutorials on Asp.net, JavaScript, jQuery here.
We can do this by using simple one line of html code, by using html meta tag.
Auto-refresh Webpage – [.aspx]
Following is the complete HTML Markup code that I used for the demonstration:
<head id=”Head1″ runat=”server”>
<meta http-equiv=”refresh” content=”10;” />
<title>Auto Refresh Webpage in every 10 seconds</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<br />
<br />
<h3>
Wait for 10 seconds and look at your web browsers tab, It’ll auto refresh page in
every 10 seconds</h3>
</div>
</form>
</body>
</html>
If you want to implement this functionality from code-behind, it’s also as simple as like that. Simply add the following line of code on Page_Load and ignore the above example.
Auto-refresh Webpage Using C# – [.cs]
Response.AppendHeader(“Refresh”, “10”);
Auto-refresh Webpage Using Vb.net – [.vb]
Response.AppendHeader(“Refresh”, “10”)