asp.net mvc 3 - How to create default custom value of dropdownlist -


i want customize default value of dropdownlist, having value of "select item" instead of value exist database.

view

 @html.editorfor(m => m.vendor) 

model

 [uihint("sellerdropdown")]     public mdl.vendor vendor{ get; set; }  

try this:

@html.dropdownlistfor(m => m.vendor, myselectlist, "select item"); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -