I am displaying a bunch of movies in a table, I am eventually deleting each movie through Javascript which hides the div.
I now want to delete the movie from the d
Have an HTTPPost action method to delete in your movie
controller
[HttpPost]
public ActionResult Delete(int id)
{
try
{
repo.DeleteMovie(id);
return "deleted"
}
catch(Exception ex)
{
//Log errror
}
return "failed";
}
And in your View,
Delete Avengers
Delete Iron Man