In my Blazor server app I have a razor page with a combobox. How can I read out the index (raw) number of the selected item of the combobox?

73 views Asked by At

In my Blazor server app I have a razor page with a combobox. How can I read out the index (raw) number of the selected item of the combobox?

For example "select" is the index=0, opel index=1,ford index=2.... If the user selects ford I want to read out the index value "2"

<td class="td_DiagBuff_data" max-width="150">
<select value="@selected_type" @onchange="@(e => { func_MD_type(e,index);  })">
    <option>select</option>
    <option>opel</option>
    <option>ford</option>
    <option>subaru</option>
    <option>renault</option>
    <option>mercedes</option>    

</select>
</td>
0

There are 0 answers