© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
3 replies
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="!" />
<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; }
-- 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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ The ``Instance`` value in ``BindingFlags``
C#CC# / help
3y ago
✅ Binding array with default value doesn't work
C#CC# / help
3y ago
Binding help
C#CC# / help
8mo ago
XAML Binding
C#CC# / help
11mo ago