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.

check these questions + , + , +:


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -