I have the following code:
// Form the continuities list
string[] continuities = new string[] { "10s", "20s", "30s" };
Model.Continuities = new SelectList(continuities, 2 );
I expect “20s” to be selected
How can I do that without creating a new class?
This is how I do it:
I have not tested it but that’s basically how it is in my code.
Edit
I was also looking it takes to parameters so you might be able to do this