title: Bind ListView to ArrayList and Display
body: <p>I don't usually work with these types of controls, so I could be completely on the wrong track here..</p>
  
  <p>The end goal is to have a dataset of records with ProductTitle, ProductURL and ProductDescription.  Then have those records displayed in a 3 column format, with additional rows if needed.  For example:</p>
  
  <p>records 1, 2, 3, 4, 5 ,6 and 7 should show</p>
  
  <pre><code>1 - 2 - 3
  
  4 - 5 - 6
  
  7
  </code></pre>
  
  <hr>
  
  <p>The error I'm getting is</p>
  
  <blockquote>
    <p>System.Web.HttpException: DataBinding:
    'System.Web.UI.WebControls.ListItem' does not contain a property with
    the name 'ProductTitle'.</p>
  </blockquote>
  
  <p>The Front-End side:</p>
  
  <pre><code>&lt;div&gt;
      &lt;asp:ListView ID="ListView1" runat="server" GroupItemCount="3" OnLoad="ListView1_Load"&gt;
  
          &lt;LayoutTemplate&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;table border="0" cellpadding="5"&gt;
                              &lt;asp:PlaceHolder runat="server" ID="groupPlaceHolder"&gt;&lt;/asp:PlaceHolder&gt;
                          &lt;/table&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/LayoutTemplate&gt;
  
          &lt;GroupTemplate&gt;
              &lt;tr&gt;
                  &lt;asp:PlaceHolder runat="server" ID="itemPlaceHolder"&gt;&lt;/asp:PlaceHolder&gt;
              &lt;/tr&gt;
          &lt;/GroupTemplate&gt;
  
          &lt;ItemTemplate&gt;
              &lt;td&gt;
                  &lt;div&gt;
                      &lt;div&gt;&lt;%#Eval("ProductTitle")%&gt;&lt;/div&gt;
                      &lt;img alt="Test Image" src="&lt;%#Eval("ProductURL")%&gt;" /&gt;
                      &lt;div&gt;&lt;%# Eval("ProductDescription")%&gt;&lt;/div&gt;
                  &lt;/div&gt;
              &lt;/td&gt;
          &lt;/ItemTemplate&gt;
  
      &lt;/asp:ListView&gt;  
  &lt;/div&gt;
  </code></pre>
  
  <p>I've got my Code-Behind:</p>
  
  <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
  End Sub
  
  
  Protected Sub ListView1_Load(sender As Object, e As EventArgs)
      Dim myPaaams As ArrayList = New ArrayList
  
      myPaaams.Add(New ListItem("ProductTitle", "Adams Test"))
      myPaaams.Add(New ListItem("ProductURL", "Adams Test"))
      myPaaams.Add(New ListItem("ProductDescription", "Adams Test"))
  
      ListView1.DataSource = myPaaams
      ListView1.DataBind()
  End Sub
  </code></pre>
  
  <hr>
  
  <p><strong>I've also tried</strong> the following code for my ListView Load event, but this fails with the same error.</p>
  
  <pre><code>Protected Sub ListView1_Load(sender As Object, e As EventArgs)
      Dim myParams As ArrayList = New ArrayList
  
      Dim variable As New Dictionary(Of String, String) From {{"ProductTitle", "Adams Test"}, _
                                                              {"ProductURL", "value2"}, _
                                                              {"ProductDescription", "value2"}}
  
      myParams.Add(variable)
  
      ListView1.DataSource = myParams
      ListView1.DataBind()
  End Sub
  </code></pre>