Re: Need a help about aspx pages??
Server.Transfer() will work fine, but it redirects server-side, the browser address bar will still show the original URL.
For a 301 redirect you can use the following:
Code:
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.example.com/newpage/");
}
In ASP.Net 4.0 it will be even easier with Code:
Response.PermanentRedirect("http://www.example.com/newpage/");
|