MVC4: The resource cannot be found
The resource cannot be found.
what is this error while i deleting a list
//Get//
public ActionResult Delete(int id=0)
{
var head = db.Payroll_SalaryHeads.Find(id);
if (head == null)
{
return HttpNotFound();
}
return RedirectToAction("Index");
}
..POST//
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public ActionResult Delete(int id=0)
{
var head = db.Payroll_SalaryHeads.Find(id);
db.Payroll_SalaryHeads.Remove(head);
db.SaveChanges();
return RedirectToAction("Index");
}