title: how to select different items of checklistbox by typing its id
body: <p>i want to select  different items of checklistbox by typing its only id in textbox.
  those items contain employee name and its id.
  my code goes like this:</p>
  
  <pre><code>    private void txtEmpID_TextChanged(object sender, EventArgs e)
      {
          SelectEmployeeList(txtEmpID.Text);
      }
  
  
      public string ParseName(string Name)
      {
          Regex regexObj = new Regex(@"[^\d]");
          string EMP_ID = regexObj.Replace(Name, "");
          return EMP_ID;
      }
  
  
      public void SelectEmployeeList(string str)
      {
          for (int i = 0; i &lt; chkListBoxLoadName.Items.Count; i++)
          {
              string Name = ParseName(chkListBoxLoadName.Items[i].ToString());
              if (str == Name)
              {
                  chkListBoxLoadName.SetItemChecked(i,true);
              }
              else
              {
                  chkListBoxLoadName.SetItemChecked(i,false);
              }
          }
      }
  </code></pre>