0

I am interested in using cascading dropwonlists in razor mvc.I have a table "samplecri" in database "BFDb" which i worked in sqlserver. I have imported that database as model into my application.

The table has following fields: sportname,gametype,country, team1 and team2.

Question Explanation : When the user selects sportname ,ex: cricket,gametype dropdownlist should be updated from the table which will be as 'Domestic' and 'International'. Then the user selects the Gametype, Ex:'Domestic', country dropdownlist should be updated stating where Domestic games are played and finally team1 and team2 dropdownlist should be updated with the teams available in that country.For example domestic teams in australia are Queensland,NSW Blues, Southern redbacks etc...

I searched in SO. I could see the similar answers but not the way i imported the model from sqlserver. Can anyone help ????

tereško
  • 58,060
  • 25
  • 98
  • 150
  • @DarinDimitrov : I saw that post mate. got one confusion with it as i am new to mvc. Do i need to create model as you have done with **myviewmodel** and **province** even after importing the database model. – Santhosh Apr 03 '13 at 06:27
  • The way you are populating the model is not really important. You could use whatever data access technology you like and design your models appropriately. – Darin Dimitrov Apr 03 '13 at 06:29
  • @DarinDimitrov: cool... one more question..this will not be relating to the above question. Can you suggest me a good book to learn MVC and razor ??? – Santhosh Apr 03 '13 at 06:33

1 Answers1

-1

Santhosh

Might take a look at this one http://bonrouge.com/~chain_select_ajax. There are a few variations & different codes available here that may assist you

Ian
  • 1
  • 1
  • 2
    Note that [link-only answers](http://meta.stackoverflow.com/tags/link-only-answers/info) are discouraged, SO answers should be the end-point of a search for a solution (vs. yet another stopover of references, which tend to get stale over time). Please consider adding a stand-alone synopsis here, keeping the link as a reference. – kleopatra Feb 20 '14 at 12:32