Open sayedihashimi opened 6 years ago
I believe the only work needed for this task is to convert @Html.ActionLink
to use the new aspnet TagHelpers (i.e. <a asp-controller="Home" asp-action="Category" asp-route-category="hats">hats</a>
).
It doesn’t look like all the work is complete here. I’m still seeing “@Html.ActionLink” in the Index view.
Sorry I had not yet pushed the changes, that's why.
It should be all set now. version control in vsmac is still not working for me, so I just used the command line. I commented out the old lines in the code.
In the previous task we created a separate controller action, and view, for each category. In this task we want to consolidate that into a single controller action. The views will still be separate, but we will consolidate that in the next task.
The work needed includes:
Category
, which will be used. This action should take a string parameter which defines the category to be displayed.Category
action and pass in the category name as a parameter.Sample of new controller action
Sample of an updated link
Learning resources