title: getting List data from ViewData in mvc2
body: <p>i am trying to get List of data from View Data 
  Here is the method which is getting list of all clients from database</p>
  
  <pre><code>public List&lt;ClientsModels&gt; GetAllClients()
          {
              String conStr = conn.GetAccessConnString();
              using (OleDbConnection con = new OleDbConnection(conStr))
              {
                  using (OleDbCommand cmd = new OleDbCommand())
                  {
                      con.Open();
                      cmd.Connection = con;
                      cmd.CommandType = System.Data.CommandType.Text;
                      cmd.CommandText = "SELECT * FROM Customers";
  
                      OleDbDataReader reader = cmd.ExecuteReader(System.Data.CommandBehavior.Default);
                      List&lt;ClientsModels&gt; allClientsList = new List&lt;ClientsModels&gt;();
  
                      while (reader.Read())
                      {
                          allClientsList.Add(new ClientsModels()
                          {
                              UserID = Convert.ToString(reader["userID"]),
                              Name = Convert.ToString(reader["Name"]),
                              Email = Convert.ToString(reader["Email"]),
                              Phone = Convert.ToString(reader["Phone"])
  
  
                          });
                      }
  
                      cmd.Dispose();
                      con.Close();
                      con.Dispose();
                      return allClientsList;
                  }
              }
          }
  </code></pre>
  
  <p>and here is the controller</p>
  
  <pre><code>public ActionResult Customers()
          {
              GetSetData data = new GetSetData();
  
              ViewData["AllClients"] = data.GetAllClients();
  
            return View();
          }
  </code></pre>
  
  <p>and here is the view</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/NewMaster.Master" Inherits="System.Web.Mvc.ViewPage&lt;dynamic&gt;" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"&gt;
      Customers
  &lt;/asp:Content&gt;
  
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  
      &lt;h2&gt;Customers&lt;/h2&gt;
      &lt;%: ViewData["AllClients"].ToString() %&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>this returns me</p>
  
  <pre><code>System.Collections.Generic.List`1[MvcApplication5.Models.ClientsModels]
  </code></pre>
  
  <p>the question is how can i get all the data one by one which is in list</p>