Question: @ { routes = current.Clone ( ) ; / / reset to current route values, so it clears the route information previously changed in table

@{
routes = current.Clone();// reset to current route values, so it clears the route information previously changed in table header for sorting
for (int i =1; i <= Model.TotalPages; i++){
routes.PageNumber = i;
string active = @Nav.Active(i, current.PageNumber);
@i
}
}
In above code, what does the tag helper "asp-all-route-data" do?
It builds the name/value entries in the dictionary into URL segments of name/value.
It builds route object into a dictionary object so that the dictionary object can be passed to List() action as a parameter, equivalent to List(Dictionary d).
It changes the route object into a dictionary object, in which contains the information of controller and area, so that MVC can locate the exact controller to handle user clicking of the anchor link.
It replaces the existing route data using whatever contained in the dictionary.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!