Skip to content

Instantly share code, notes, and snippets.

@jbouy
Created August 29, 2013 03:53
Show Gist options
  • Save jbouy/6374085 to your computer and use it in GitHub Desktop.
Save jbouy/6374085 to your computer and use it in GitHub Desktop.
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Delete(int id) {
//Delete that stuff!
}
public static string DeleteAnswerLink(this HtmlHelper html, string linkText, Answer answer)
{
return html.RouteLink(linkText, "answer",
new { answerId = answer.Id, action = "delete" },
new { onclick="$.post(this.href); return false;" });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment