title: cant get values of item in foreach loop
body: <p>I can't get the values in the view that I sent from the controller.</p>
  
  <p>I tried two ways but I can't make them appear in a div. I must show the values in a table or label.</p>
  
  <p>Controller:</p>
  
  <pre><code>List&lt;string&gt; tsList = new List&lt;string&gt;();
  ts.tarih = ogrenci.Tarih;
  tsList.Add(ts.tarih);
  tsList.Add(ogrenci.TaksitSayisi);
  tsList.Add((36000 / Convert.ToInt32(ogrenci.TaksitSayisi)).ToString());
  
  string odeme=(36000 / Convert.ToInt32(ogrenci.TaksitSayisi)).ToString();
  List&lt;TaksitSaysi&gt; lstTaksit = new List&lt;TaksitSaysi&gt;();
  lstTaksit.Add(new TaksitSaysi()
  {
      taksitSayisi = ogrenci.TaksitSayisi,
      tarih = ogrenci.Tarih, tutar = odeme
  });
  return View("Index",lstTaksit);
  </code></pre>
  
  <p>I first try tsList but can't show the item in a label or div.</p>
  
  <p>Now i try lstTaksit. I tried several way in my view again but none of them work.</p>
  
  <p>I want then item to be text of a label. I relaized that when I wrote the code in an if, for, or foreach etc. it doesnt show it.  For example i created a div and write some text in it and it doesnt show on page </p>
  
  <p>My view is:</p>
  
  <pre><code>@model IEnumerable&lt;TaksitSaysi&gt; 
  @if (Model != null)
  {
      foreach (var item in Model)
      {
          if (item != null)
          {
  
              **&lt;div&gt;deneme&lt;/div&gt;**
              &lt;table id="Table" &gt;
              @for (int i=0;i&lt;Convert.ToInt32( item.taksitSayisi) ;i++ )
              {
                  &lt;text&gt; &lt;tr&gt;&lt;td&gt; @item.tutar &lt;/td&gt;&lt;/tr&gt;&lt;/text&gt;
              }
              &lt;/table&gt;
              break;
          }
      }
  }
  </code></pre>