I've got another question.
I'm trying to insert this code in new_ticket.aspx:
ddlUnit.Items.FindByText("Skole-IT").Selected = true;
Just below this code:
foreach (unit u in units.OrderBy(p => p.unit_name))
ddlUnit.Items.Add(new ListItem(u.unit_name, u.id.ToString()));
Utils.PopulateSubUnits(db, ddlUnit, ddlSubUnit, accessLevel);
I have a group called "Skole-IT" and I want this group to be preselected when a user creates a new ticket, but I get an error:
"Cannot have multiple items selected in a DropDownList."
I can't figure out where this error comes from, since the debugger gives me a line number in the aspx file, where the drop down list is specified.
Can anyone help me out?
Thanks in advance.