Using ActionLink and specifying the DELETE Constraint
I'm using RestfulRoutes written by Steve Hodgkiss. So far so good but I do have a question. I have a Session Controller that I want to use to destroy a users session when they click the logout button. How can I do this with and action link?
So far I have the following.
<%= Html.ActionLink("Logout", "Destroy", "Session") %>
I need to hit the following route开发者_JS百科.
Session/{id} and have a DELETE constraint.
I hope this makes sense.
Mike
An anchor tag in HTML can only ever issue a GET, it cannot issue any other verbs (unless you intervene with JavaScript).
精彩评论