You can use [FromQuery]
to bind a particular model to the querystring:
https://learn.microsoft.com/en-us/aspnet/core/mvc/models/model-binding
e.g.
[HttpGet()]
public IActionResult Get([FromQuery(Name = "page")] string page)
{...}
More Related Contents:
- How to read AppSettings values from a .json file in ASP.NET Core
- Return file in ASP.Net Core Web API
- Return View as String in .NET Core
- System.Text.Json API is there something like IContractResolver
- Add client certificate to .NET Core HttpClient
- How to instantiate a DbContext in EF Core
- .NET Core DI, ways of passing parameters to constructor
- Automatic native and managed DLLs extracting from Nuget Package
- Send HTTP POST message in ASP.NET Core using HttpClient PostAsJsonAsync
- What are the costs and possible side effects of calling BuildServiceProvider() in ConfigureServices()
- Command dotnet ef not found
- Switch between dotnet core SDK versions
- Inject service into Action Filter
- ASP.NET Core appsettings.json update in code
- Proper way to register HostedService in ASP.NET Core. AddHostedService vs AddSingleton
- Setting the version number for .NET Core projects – CSPROJ – not JSON projects
- System.Text.Json: Deserialize JSON with automatic casting
- File permissions on Linux/Unix with .NET Core
- How to SetBasePath in ConfigurationBuilder in Core 2.0
- How do I reference a .NET Framework project in a .NET Core project?
- Is there a built in way of using snake case as the naming policy for JSON in ASP.NET Core 3?
- Refresh Token using Polly with Named Client
- Using a Scoped service in a Singleton in an Asp.Net Core app
- How to use SqlClient in ASP.NET Core?
- Cannot find command ‘dotnet ef’
- How to change the port number for Asp.Net core app?
- Filter Serilog logs to different sinks depending on context source?
- ASP.NET Core modify/substitute request body
- How to resolve .net core build error NETDSDK1061 and warning MSB3277
- Net Core: Execute All Dependency Injection in Xunit Test for AppService, Repository, etc