I got a view where I list files and I got a Delete button but I got problems the delete act like a link (get instead of post). I can't figure out why. I'm on a view that's called EditFiles so I just want to delete the file and kinda refresh the page. Any thoughts on this?
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult DeletePicture(string name)
{
Do some code here
_AdminViewModel.Site = _pageBodyService.Get().Where(x => x.BelongSite == "Innergard").SingleOrDefault();
return View("EditFiles", _AdminViewModel);
}
<%= Html.ActionLink("Radera bild", "DeletePicture", new { name = picture.Picture })%>