ASP.NETで303回答を作成する方法
-
14-11-2019 - |
質問
HTTPステータスコード303 (求める)を使用して、ASP.NET で現在の要求をリダイレクトする方法を知っていますか。
コードスニペットは歓迎以上のものです!
解決
あなたはこのようにそれをすることができるはずです:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Status = "303 See Other";
HttpContext.Current.Response.AddHeader("Location", newLocation);
HttpContext.Current.Response.End();
. 所属していません StackOverflow