ASP.net MVC 4 Drop Down List -


i bit lost on concept of drop down list in mvc 4.

i have models

gender - int id - string title

user -string firstname - gender -...

i bit unsure how tackle it, keep clean , simple.

for type in class users, should gender because name of table or should ienumerable?

if if missing other things?

also should provide specific controllers? or how display dropdownlist in c# mvc 4 razor code.

have @ selectlist class http://msdn.microsoft.com/en-us/library/system.web.mvc.selectlist%28v=vs.108%29.aspx

this goes in model, can create dropdownlist this:

@html.dropdownlist("genderid", model.genders) 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -