bryantgoat
New Member
When I'm creating a new SelectList, I (think only sometimes) see the defaultValueItemLabel option in \[code\]SelectList.CreateDropDown()\[/code\]. The comment says \[quote\] The label of the default-value item, which will appear first, and only if none of the list items have an ID with the default value. Do not pass null. If you pass the empty string, no default-value item will appear.\[/quote\]But my SelectList is of type \[code\]int?\[/code\] and I have to pass it the selectedItemId anyway. So what "default" value is it talking about? How can there be a default value if I have to pass the selected value? I can guess that \[code\]defaultvalueItemLabel\[/code\] is used when you want the user to be able to choose the null values of a nullable-type-based SelectList. But if that were true, then why can I also specify \[code\]placeholderIsValid: true\[/code\]? Now I'll have two options the user can select that allow them to choose null? When is this useful?