I have a select list that looks like this:

<select class="form-control">
     <option value="2">Order</option>
     <option value="5">Delivery</option>
     <option value="6">PickUp</option>
     <option value="13">Quote</option>

Once a user selects an option, I would like to display a comment only where db_Type = the value of the selected option:

foreach (var note in Model.GetNotes)
        <div class="current-note-container">
            <h5 class="note-comment"><b>Description:</b><br/> @note.db_Comment.Where(note.db_Type == /* Selected Index */)</h5>

I'm not really sure how I can accomplish this using razor, or how to mix javascript in to get the job done.

Related posts

Recent Viewed