title: how to return IEnumerable List values to View page in mvc
body: <p>Getting data in a list format using IEnumerable,How to return to View page from controller.</p>
  
  <p>model.Name = UserPermissions.Name; is this correct format?</p>
  
  <p>List containing name,Id,Amount,Currency for each plan.</p>
  
  <p>model.Name = UserPermissions.Name;  getting error here.from list pass all data to view dynamically in DIV.How to pass data and display in view.help me guys</p>
  
  <pre><code>   public ActionResult Plans(Plan model)
  {
      var planServicenew = new StripePlanService(apiKey);
              IEnumerable&lt;StripePlan&gt; responsenew = planServicenew.List();
              foreach (var UserPermissions in responsenew)
              {
                  model.Name = UserPermissions.Name;
              }
      return View(model);
  }
  </code></pre>
  
  <h1>view page</h1>
  
  <pre><code>@model IEnumerable&lt;ABACUS.Models.Plan&gt;
  @foreach (var item in Model)
  {
          &lt;div class="plan"&gt;
              &lt;h3 class="plan-title"&gt;@Html.DisplayFor(modelItem =&gt; item.Name)&lt;/h3&gt;
              &lt;p class="plan-price"&gt;@Html.DisplayFor(modelItem =&gt; item.Currency)@Html.DisplayFor(modelItem =&gt; item.Amount) &lt;span class="plan-unit"&gt;per month&lt;/span&gt;&lt;/p&gt;
              &lt;ul class="plan-features"&gt;
                  &lt;li class="plan-feature"&gt;@Html.DisplayFor(modelItem =&gt; item.Trial)-days &lt;span class="plan-feature-name"&gt;Trial&lt;/span&gt;&lt;/li&gt;
  
              &lt;/ul&gt;
              &lt;a href="#" class="plan-button"&gt;Choose Plan&lt;/a&gt;
          &lt;/div&gt;
  }
  </code></pre>