?
=?iso-8859-1?Q?=BF_Mahesh_Kumar?=
Hi groups,
Control name : ListboxID (lstCertification), selection mode=mutliselect.
On Pageload i'm assinging string lstSplit="1/3/6/8" of the previously selected listindex id's. Now on the page load for updation, i have to reload the selected items again with the same string "1/3/6/8" to be selected in my multiselect list box.
Its asking me to convert object to int... for list selection. but how to achieve this..?
--------------------------------------
string[] result;
string lstSplit;
lstSplit = "1/3/7/8";
char[] sep = { '/' };
Array a = lstSplit.Split(sep);
for (int i = 0; i < a.Length; i++)
{
lstCertification.SelectedIndex = a.GetValue(i) ; << -------------- casting from Obj to Int..??
lstCertification.SelectedItem.Selected = true;
}
---------------------------------------
I want to multiselect my listbox on page load with the string value stored in Database "1/3/5/6/8" etc to listbox mulitselection iindex..? is there any other way to solve this..???
Mahesh
Control name : ListboxID (lstCertification), selection mode=mutliselect.
On Pageload i'm assinging string lstSplit="1/3/6/8" of the previously selected listindex id's. Now on the page load for updation, i have to reload the selected items again with the same string "1/3/6/8" to be selected in my multiselect list box.
Its asking me to convert object to int... for list selection. but how to achieve this..?
--------------------------------------
string[] result;
string lstSplit;
lstSplit = "1/3/7/8";
char[] sep = { '/' };
Array a = lstSplit.Split(sep);
for (int i = 0; i < a.Length; i++)
{
lstCertification.SelectedIndex = a.GetValue(i) ; << -------------- casting from Obj to Int..??
lstCertification.SelectedItem.Selected = true;
}
---------------------------------------
I want to multiselect my listbox on page load with the string value stored in Database "1/3/5/6/8" etc to listbox mulitselection iindex..? is there any other way to solve this..???
Mahesh