# \[FromQuery\]

*noun*

say it: **“frum-KWEER-ee”** **/frəmˈkwɪəri/**

An ASP.NET Core attribute that says an action parameter's value comes from the query string.

## What is **[FromQuery]**?

`[FromQuery]` says a parameter comes from the query string, like `?page=2`. Simple types not in the route come from the query by default.

```csharp
app.MapGet("/recipes", ([FromQuery] int page = 1, [FromQuery] int pageSize = 20) => ...);
```

## In a sentence

- “**FromQuery** on page reads the 2 from ?page=2.”

Level: Apprentice · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/fromquery
