balzor onchange

51

balzor onchange -

<select @onchange="DoStuff">  <!-- pre-3.0 versions: onchange=@DoStuff -->
    @foreach (var template in templates)
    {
        <option value=@template>@template</option>
    }
</select>

void DoStuff(ChangeEventArgs e)
{
    string selected = e.Value.ToString();
}

Comments

Submit
0 Comments