关于出错也跳转处理

BaseData.ErrorLog.WriteError(ex);

 Response.Status = "301 Moved Permanently";

 Response.AddHeader("Location", "/city_list.aspx");

 Response.End();

  
    
301跳转有两种写法,如果要
Response.StatusCode = 301;这样写必须如下跳转
Response.RedirectLocation=" http://www.soufun.com";才有效,
 
Response.StatusCode = 301
Response.Redirect(" http://www.soufun.com");无效 仍未302

你可能感兴趣的:(跳转)