Monday, June 16, 2014

Ways to Auto Redirect a page

Their are two way to auto redirect a page

1. Using meta tag

        <meta http-equiv="refresh" content="5; url=http://bharatkushwaha.blogspot.com" />



2. Using response.addheader

        string url = "Default.aspx";
        Response.AddHeader("REFRESH", "2;URL='" + url + "'");
        Label1.Text = "<b>You will be redirected to Category automaticallly within few seconds";
        Label1.ForeColor = System.Drawing.Color.Green;

No comments:

Post a Comment