aspnet / Mvc

[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
5.62k stars 2.14k forks source link

Razor Pages does not map query parameter if it is called `page` #8676

Closed gyankov closed 6 years ago

gyankov commented 6 years ago

Bug

Description of the problem:

Currently sending a query parameter called page is not possible in a Razor Pages project. I am aware that the framework does not bind it correctly as page is a keyword. However, is there any workaround to send a query parameter called page?

poke commented 6 years ago

Duplicate of #7876. Unfortunately, there’s no workaround for this. You will have to choose a different parameter name (e.g. p) or switch to controllers to make this work.