成功したらpost、ユーザーを別のWebサイトにリダイレクトしたいというアクションがあります。これは私のアクションコードです:
[HttpPost]
public ActionResult RegistartionComplete(Customer customer)
{
if (ModelState.IsValid)
{
db1.Entry(customer).State = EntityState.Modified;
db1.SaveChanges();
return Redirect(@"http://www.google.com");
}
return View(customer);
}
問題は、db1.SaveChanges()が実行された後、(URLに従って)同じページにリダイレクトされますが、Internet Explorer cannot display the webpageメッセージが表示されることです。ブレークポイントでテストすると、return Redirect(@"http://www.google.com");が実行されていることがわかりますが、同じアクションビューに戻るだけです。