Hi,
from your code it looks like you are storing string value in viewState. if it is so then below solution may help you,
string strEmployee = ViewState["empIds"]?? "";
string[] empIds = strEmployee.Split(',');
foreach (var item in empIds)
{
}
hope this may help you,
thanks
-Amit.