I need to fill a dropdownlist with values from a settings table in a database.
(id int, code string, description string, value string)
1 , 1 , "something" , "This1"
2 , 1 , "this too" , "This2"
3 , 2 , "something else" , "This2"
n , x , and so on.......
Now I only want to fill the dropdownlist with code 1 (I want to use this on a lot of pages.)
How can I do this?? url to a tutorial or something like is also ok! btw I am using mvc3. cheers