I am trying to update a drop down based on the users selection in the first drop down. I found this SO post on the topic, but Im not quite sure how to add the jquery to filter values to my Razor view. Can someone point me in the right direction?
My view so far:
@using System.Security.Claims;
@model UpdateClaimFormModel;
<h2>UpdateClaimView</h2>
@using (@Html.BeginForm())
{
<select name="emailcheese">
<option selected disabled>Select User</option>
@foreach (var i in Model.UserNames)
{
<option>@i.ToString()</option>
}
</select>
<select name="authpolicy">
<option selected disabled>Select Claim:</option>
@foreach (var i in Model.UserClaims)
{
<option>@i.Type.ToString()</option>
}
</select>
<div class="form-group">
<button type="submit" class="btn btn-default">Whoo</button>
</div>
}
My Goal:
Select User [bob, bill, jim]
Select Claim: If user bob:[1,2,3], If user bill:[1,4,8], If user him:[4,5,6]