I have an ASP.NET MVC project and I have a single action that accepts GET, POST, and DELETE requests. Each type of request is filtered via attributes on my controllers Action
methods.
[ActionName(Constants.AdministrationGraphDashboardAction),
AcceptVerbs(HttpVerbs.Post)]
public ActionResult GraphAdd([ModelBinder(typeof (GraphDescriptorBinder))] GraphDescriptor details);
[ActionName(Constants.AdministrationGraphDashboardAction),
AcceptVerbs(HttpVerbs.Delete)]
public ActionResult GraphDelete([ModelBinder(typeof (RdfUriBinder))] RdfUri graphUri)
I have my GraphAdd
method working very well. What I'm trying to figure out is how I can create an HTML <form />
or <a />
(link) that will cause the browser to perform an HTTP Delete request and trigger my GraphDelete method.
If there is a way to do this can someone post some sample HTML and if available the MVC HtmlHelper method I should be using?