Is it a good way to use routed values for column name, page and sort dir or are there better ways to keep the webgrid settings alive?
Currently it looks like this:
@Html.ActionLink("Delete", "DeleteEntry", new { id = item.Id, sortdir, sort = webgrid.SortColumn }, new { @class = "LoeschenImgStyle", onclick = "return confirm('You're sure?');" })
And my controller method looks like this:
public ActionResult DeleteEntry(Guid id, string sortdir, string sort)
{
_einheitenRepository.DeleteIt(id);
return RedirectToAction("Index", new { sortdir, sort });
}
Are there better alternatives to do the same?
Thanks :)