User1021841275 posted
If you mean to use the textbox as an AutoComplete, that's not what I'll answer here.
If you want to get value in the text box you can use:
<InputText @bind-Value="StrMsg" @oninput="@(() => YourFunctionName(valueIfYouNeedIt))" type="text" />
or any other @on-event that suits you.