更改下拉值后,我需要更新会话变量
<select id="dropdownID" class="form-control select2"
style="height:50px;">
@foreach (var item in (Session["DisplayList"] as List<Customer>))
{
<option value = "@Url.Action("ChoosingProfil","Account", new { customerId = item.Id})">
@((string)string.Concat(item.Code, " ", item.Designation, " ", item.Town))
</option>
}
</select>
和javascript
<script>
$(document).ready(function(){
$('#dropdownID').change(function(e){
window.location = $(this).val();
});
});