If you're trying to manually do it, and are not databound, something like this:
<asp:listbox id="list1" runat="server" selectionmode="Multiple" xmlns:asp="#unknown">
<asp:listitem value="1" text="Apple"></asp:listitem>
<asp:listitem value="2" text="Orange"></asp:listitem>
<asp:listitem value="3" text="Banana"></asp:listitem>
<asp:listitem value="4" text="Pear"></asp:listitem>
</asp:listbox>
Codebehind:
string selections = "2,4";
string[] selectedValues = selections.Split(',');
list1.SelectionMode = ListSelectionMode.Multiple;
foreach (string value in selectedValues)
{
ListItem item = list1.Items.FindByValue(value);
if (item != null)
{
item.Selected = true;
}
}