When I use Url.Action in a view it strips any route values I've added. Should I be using something else? I'm trying to do pagination on V11.
Example:
Url.Action("Index", new { page = 2 }) should render a link like /controller/index?page=2 but page is stripped out and I end up with /controller/index.
My controller index method looks like this below and can receive "page" if i enter the url manually in my browser.
public IActionResult Index([FromQuery(Name = "page")] int page = 1){ ... }
Url.Action route values removed
When I use Url.Action in a view it strips any route values I've added. Should I be using something else? I'm trying to do pagination on V11.
Example: Url.Action("Index", new { page = 2 }) should render a link like /controller/index?page=2 but page is stripped out and I end up with /controller/index.
My controller index method looks like this below and can receive "page" if i enter the url manually in my browser. public IActionResult Index([FromQuery(Name = "page")] int page = 1){ ... }
I ended up creating a helper since url.action will not work here.
is working on a reply...