While implementing custom form in Blazor I am not able to bind value to html input box.
<div class="col-sm-4">
<input type="text" class="form-control" id="title" placeholder="Blog Title"
@bind-Value="blogTitle" @bind-value:event="oninput" />
</div>
@code
{
string blogTitle = "";
}
I am using Blazor version 3.2.0 preview version.
Any help would be appreciated. Thanks
After restarting visual studio it worked. The correct one is with "V" capital.
@bind-Value="blogTitle"
@bind-Value:event="oninput"
There is seems to be issue with Visual Studio 2019 preview. Whenever I add new nutget package it gives errors for missing references. I have to restart my visual studio so that newly added package takes effect. I hope updating visual studio with latest version will resolve the issue.
try to type lower case "V"
@bind-Value
replace to
@bind-value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With