How to use the 301 header for redirect to another page. Note that this method is common when dealing with SEO. It is important to stop execution of the page by using the End function.
protected void Page_Load(object sender, EventArgs e)
string id = Request.QueryString["id"].ToString();
if (id == "6")
Response.Status = "301 Moved Permanently";