C#C
C#4y ago
Luciferno

Value binding

I am running in to this error:
This is what my code looks like on the index.razor page
<Field InputType="Enums.InputType.Text"
       Name="test"
       Placeholder="test"
       HasLabel="true"
       LabelType="LabelType.Middle"
       @bind-ValueOne="x"
       @bind-ValueTwo="y"
       Label="!" />

And this is in the field itself
-- Front end
<input type="text" class="form-control" @bind:get="ValueOne" @bind:set="ValueOneChanged" />
<span class="input-group-text" id="@LabelId">@Label</span>
<input type="text" class="form-control" @bind-value="@ValueTwo" />


-- CS behind file
        [Parameter]
        public string ValueOne { get; set; }

        [Parameter]
        public EventCallback<string> ValueOneChanged { get; set; }

And I am following the tutorial provided in one of the screenshots.
Don't know what I am ding wrong
image.png
image.png
Was this page helpful?