This repository was archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
FromRouteAttribute doesn't seem to work in Razor Pages #6402
Comments
Is this on a GET request? We don't execute any model binders by default for GET requests. You have to explicitly annotate the property to state this: [BindProperty(SupportsGet = true)]
[FromRoute]
public string Foo { get; set; } |
Then you can close if it's by design. But do you mean it's model bound for some other verbs? |
We're going to take some action here to make pages 100% consistent with controllers. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With this route:
Foo is empty, however I can access the value with
RouteData.Values["Foo"]
The text was updated successfully, but these errors were encountered: