c# - Show different outputs when dropdownlist selection changes -
i have viewmodel list<mouse>. in view, binded viewmodel, have dropdownlist mouse ids. when user selects item list, have change information displayed on page in lot of textboxes (showing mouse information). how can this?(using controller/razor/..?)
i've tried with
@html.dropdownlist(mouselist, new { autopostback = "true",onselectedindexchanged="garantidropdown_change" }) and inserting method in controller not work.
there not such things autopostback or onselecteditemchanged events in asp.net mvc . these belong asp.net webforms . in order want , should use javascript .
something :
@html.dropdownlist(mouselist, new { onchange = "this.form.submit();" }) and in controller add action recieve form data.
Comments
Post a Comment