I have a small problem: I am working in asp.net mvc4 and I need to fix this situation:
I have a page with a textbox and multiple dropdown lists. Those dropdown lists' values are related to what the user puts into the textbox. IE:
If in the textbox there's 'foo'
I would want ddl1
to be set on 'A'
, ddl2
on '1'
and ddl3
on 'True'
.
Those values are bound together into a sql database as the textbox contains the primary key. So I have a database like this:
'foo' (key) , 'A', '1', 'True'
'bar' , 'B', '1', 'False'
'qux' , 'C', '2', 'True'
and so on.
I would just want that depending on what is written in the textbox, the page sets the ddls
to correspondent values.