Now here in this tutorial, I’ll explain how to redirect to a specific page or URL automatically in specific interval or time span, let’s say in every 10 seconds.
We can do this by using simple one line of html code, by using html meta tag. Here is the example:
Auto-refresh Webpage – [.aspx]
Following is the complete HTML Markup code:
<head id="Head1" runat="server">
<meta http-equiv="refresh" content="10;url=https://www.aspneto.com" />
<title>Auto Redirect to page or URL in 10 seconds</title>
<form id="form1" runat="server">
Wait for 10 seconds, It’ll automatically redirect you to the URL</h3>
If you want to implement this functionality from code-behind, its also as simple as like that. Simply add the following line of code on Page_Load and ignore the above example.
Auto-redirect Webpage Using C# – [.cs]
Auto-redirect Webpage Using Vb.net – [.vb]