title: Regarding foreach loop and arraylist
body: <pre><code>ArrayList demo = new ArrayList();
  demo.Add(tbxProjName.Text);
  string DatabaseFieldValues;
  foreach (string dataType in demo)
            {
               DatabaseFieldValues = dataType + ",";
                Response.Write(DatabaseFieldValues);
  
               Session["DatabaseFieldValuesSession"] = DatabaseFieldValues; 
            } 
  Response.Write(Session["DatabaseFieldValuesSession"]);
  </code></pre>
  
  <p>In this code,</p>
  
  <p>In foreach loop I am able to print all the items of arraylist and i am storing that string in session, but when I am printing thae session value it only prints the last item of the arraylist.</p>
  
  <p>How can I store all the items of the arraylist in a session?</p>