title: jquery split() and indexOf results in "Object doesn't support this property or method"
body: <p>I have the following code:</p>
  
  <pre><code>var selected = $('#hiddenField').val().split(",");
  ...
  if (selected.indexOf(id) &gt; 0) {
     ... set value ...
  }
  </code></pre>
  
  <p>I'm dynamically creating a CheckBoxList, and trying to remember the state of the checkboxes by putting the selected IDs into the hidden field.</p>
  
  <p>I get an error stating that "Object doesn't support this property or method".  My assumption is that selected is an array, which should support indexOf.  Is that incorrect?  </p>