こんにちはリダイレクトされないRedirectToActionに問題があります。私のコードは、リダイレクトに置かれたブレークポイントにヒットするので、呼び出されていることを確認できます。しかし、何も起こっていないようです。MVC 5 - リダイレクトされないリダイレクト
私はChromeのネットワークトラフィックを調べてみましたが、何も明らかではないようです。私は何かをシンプルに欠いているに違いない
//
// POST: /Blog/CreateBlog
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult CreateBlog(BlogViewModel model)
{
var userId = User.Identity.GetUserId();
model.UserId = userId;
if (ModelState.IsValid && model.UserId != null)
{
Mapper.CreateMap<BlogViewModel, Blog>();
if (_blogProcess.CreateBlog(Mapper.Map<BlogViewModel, Blog>(model)))
{
RedirectToAction("Index", "Blog");
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
Jeebus ...その小さなキーワードを見落とすことは、顔に深刻な打撲です。私たちの正気をチェックしていただきありがとうございます! – CodeBreaker