ASP.NET 倒數計時轉向到另一個網頁

ASP.NET 倒數計時轉向到另一個網頁


using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
 
public partial class countdown : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlMeta meta = new HtmlMeta();
        meta.Attributes.Add("http-equiv", "REFRESH");
        meta.Content = "3; URL=http://www.google.com.tw"; // 前為秒數,後為欲轉向何處
        this.Header.Controls.Add(meta);
    }
}