后台还原checkboxlit的是否被选中的属性

          string company = dtInvestigate.Rows[0]["SurveyCompanyName"].ToString();
                  string[] strs = company.Split(',');
                  for (int i = 0; i < strs.Length; i++)
                  {
                      foreach (ListItem oItem in ddlSurveyCompanyName.Items)
                      {
                          if (strs[i].Trim() == oItem.Value)
                          {
                              oItem.Selected = true;
                          }
                      }
                  }

 

posted @ 2012-07-05 19:35  付飞  阅读(190)  评论(0编辑  收藏  举报