Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to avoid selecting the default value in a dropdown in Blazor?

$
0
0

I have a dropdown with a default value By default the first option is selected automatically but I want to ensure that users actively select a value instead of using the default

<select @bind="SelectedValue"><option value="Option1">Option 1</option><option value="Option2">Option 2</option></select><p>Selected Value: @SelectedValue</p>@code {    private string SelectedValue = "";}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>