I have a webpart and I want to select mulitple items in a listbox,pretty easy.I am using webcontrols namespace.So I am declaring listbox as
ListBox lBox = new ListBox();
lBox.ID=”lbox”;
lBox.SelectionMode=”Multiple”;
But it is not accepting that . The error I m getting is cannot convert string type to listbox selection sth..
If anyone is having any idea where I m getting wrong?
Thanks,
From Programmatically Select Multiple Items
Code behind: