开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜