Closed suhbcc closed 3 years ago
Sorry, found it!
ListItem l1 = new ListItem() { Selected = false, Text = "A", Value = "1" };
list.Choices.Add(l1);
ListItem l2 = new ListItem() { Selected = true, Text = "B", Value = "2" };
list.Choices.Add(l2);
ListItem l3 = new ListItem() { Selected = false, Text = "C", Value = "3" };
list.Choices.Add(l3);
Hello, How would you pre-select an option in a Select when you are generating the form? Instead of a list of strings, would it be possible to set a select to a list of ids/values? Thank you very much!