Hi I have a question,
I'm experimenting with Blazor and it has been fun but I was wondering when I bind a simple model, with one int property to a text input for example:
<input type="text" class="communication__control--input" id="broadcast-port" autocomplete="off" placeholder=" " @bind="@this.Simple.Number" />Now property in model is just int (not nullable) so default value would be 0 for that input. So my question is can I make that 0 will show as an empty string in input and still if I write any value (for example 3 will show as 3 but 0 will show empty string) to it it will bind?
Basing @Bennyboy1973 comment, basically I could go with 2 properties one that will be binded string prop and other would be read only int that will try to convert first one, or just use 2 model combination (something like DTO and backend model) with Automapper. But is there any simpler way?