Search code examples
c#asp.net-coreblazor.net-standardblazor-webassembly

Blazor app puzzling compiler error message on a new page


I have a simple Blazor page but I'm getting some strange error messages. I cleaned the solution and rebuild the project but the same error pops up. This is all started when I copied an existing razor page, pasted and renamed it. So I deleted the copy and did an Add New but still getting four error messages. One of them is complaining about the @page "/register" which I have no idea why. Any ideas? Thanks!

enter image description here


Solution

  • The last bind-Value is wrong. You can't bind to .ToString().

    bind-* enables two way binding, therefore the bound item needs to be "writable" like a property or a field.