Replies: 1 comment
-
I fixed it by making it nullable and removing the attribute. If this is the way it should be the docs should reflect that - currently they show the attribute being used on a record. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using Razor Pages 7 I have this in the code-behind file:
I populate that in the
OnGet()
and show it on the page. I read it in theOnPost()
to update the database.But
Address
is supposed to be read-only. I do not allow it to be changed, so the post handler always fails with a validation error of"The Address field is required"
.I also tried the long-form record syntax, and the
[property:BindNever]
syntax, with the same result. The BindNever attribute does not work on the record (even though the docs show that it should).Anyone know why?
Beta Was this translation helpful? Give feedback.
All reactions