I'm following the NerdDinner ASP.Net MVC tutorial and I have the following line of code:
<%= Html.ActionLink("Edit Dinner", "Edit", new { id = Model.DinnerID}) %> |
<%= Html.ActionLink("Delete Dinner", "Delete", new { id = Model.DinnerID }) %>
What I don't understand is why the third parameter of the ActionLink requires a new {} command. Can someone please elaborate?
Why does it need to create a new {}, instead of just passing the ActionLink the Model.DinnerID without instancing it to another variable?