title: how to manipulate comma separated string from list<string[]> binding in aspx page?
body: <p>I have a repeater control in aspx page and I am binding it to a <code>list&lt;string[]&gt;</code> If i wanted to display repeater item at index 10 of the string array i would do the following; </p>
  
  <pre><code>&lt;%# ((string[])(Container.DataItem))[10] %&gt;
  </code></pre>
  
  <p>Which works correctly and as expected.</p>
  
  <p>Now in <code>&lt;%# ((string[])(Container.DataItem))[18] %&gt;</code> it returns a comma separated string <code>“item1, 1, item2, 2, item3, 3”</code> and I want to be able to display and control each item in the string.
  I tried using </p>
  
  <pre><code>&lt;% foreach (var v in (((string[])(Container.DataItem))[18]).Split(','))
   {
    //do something
   }
  
  %&gt;
  </code></pre>
  
  <p>But I will get this error: <strong>The name 'Container' does not exist in the current context</strong></p>
  
  <p>And I tried using </p>
  
  <pre><code>&lt;%# foreach (var v in (((string[])(Container.DataItem))[18]).Split(','))
   {
    //do something
   }
  
  %&gt;
  </code></pre>
  
  <p>But I will get the following error: <strong>Invalid expression term 'foreach'</strong> </p>
  
  <p>So, how am I supposed to be able to bind the comma separated sting while being able to manipulate the data?</p>