public static string SetSelectedValues(DropDownList ddlList, string selectedValues)
{
string selectedValue = string.Empty;
foreach (string selValue in selectedValues.Split(','))
{
ListItem listItem = ddlList.Items.FindByValue(selValue);
if (listItem != null)
{
listItem.Selected = true;
selectedValue += listItem.Value + ",";
}
}
return selectedValue.Trim(',');
}
Tuesday, September 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment