@Html.ActionLink("Don't touch me", "Details", "Object", new { foo = "bar", baz = "qux" }, new { style = "text-decoration: line-through !important;" })
This is a much better way to do Razor links than this way. Jitendra Patil pointed it out to me today. The five parameters are:
- the name that will appear to a user for the link
- the Action
- the Controller
- URL line variables
- HTML in-line parameters for the link
No comments:
Post a Comment