КонтроллерПеренаправление к действию вызывает 404
[HttpPost]
public ActionResult Index(string Name, int number)
{
Stored stored = new Stored();
var isValid = from c in _db.stored
where (c.Name == Name && c.Id == number)
select c;
if (isValid.Count() > 0)
{
return View("Index");
}
else if (isValid.Count() > 0 && c.hasExpired)
{
return RedirectToAction("Send", "Mail", new { theNumber = number });
}
else
{
return View("Index");
}
}
Целевой класс
[HttpPost]
public ActionResult Send(int number)
Оба имеют HTTP Post атрибут
Можете ли вы предоставить нам более подробную информацию? Может быть, журналы? – Sid
Все, что я получаю, это 404 для следующего URL-адреса http: // localhost: 64765/Mail/Send? TheNumber = 2 Controller называется MailController – user2620804
Пробовали ли вы использовать отладчик? – Sid