title: C# Asp.net having arraylist to take in two or more column data of SQL Server?
body: <p>I have a database that contain a table called <code>ResourceInfo</code>.</p>
  
  <p>Inside <code>ResourceInfo</code>, there are 2 columns - <code>resourcetype</code> and <code>description</code>.</p>
  
  <p>There is a global variable <code>protected List&lt;String&gt; ResourceType = new List&lt;String&gt;();</code> that will actually and eventually get pass to the ASPX file's javascript.</p>
  
  <p>The following is the C# code.</p>
  
  <p>How do I store the data from the 2 columns into the variable <code>ResourceType</code>?</p>
  
  <pre><code>            if (caltab.HasRows)
              {
                  while (caltab.Read())
                  {
                      ArrayList txtval = (ArrayList)[caltab["resourcetype"], caltab["description"]];
                      ResourceType.Add(txtval);
  
                  }
              }
  </code></pre>