title: Check List Box before Adding New Item
body: <p>I am trying to check that an item doesn't already exist in a list box before I add the new item.</p>
  
  <pre><code>            if (TeamNameTextBox.Text != "")
          {
              if (TeamNameListBox.Items.FindByValue(TeamNameListBox.Text) == null)
              {
                  TeamNameListBox.Items.Add(TeamNameTextBox.Text);
                  TeamNameTextBox.Text = "";
  
                  int teamCountUpdate = TeamNameListBox.Items.Count;
                  if (teamCountUpdate == 1)
                  {
                      TeamCount.Text = teamCountUpdate.ToString() + " Team";
                  }
                  else
                  {
                      TeamCount.Text = teamCountUpdate.ToString() + " Teams";
                  }
              }
              else
              {
                  AddTeamSeasonError.Text = "This team has already been added";
              }
          }
          else
          {
              AddTeamSeasonError.Text = "Please select a team";
          }
  </code></pre>
  
  <p>I have got it to check if the text box is blank, but I need to check that the item a user is trying to add is not already in the the list box.</p>
  
  <p>I have tried the line: </p>
  
  <pre><code>if (TeamNameListBox.Items.FindByValue(TeamNameListBox.Text) == null)
  </code></pre>
  
  <p>But that doesn't work, any suggestions on how I can do the check?</p>