title: The model item passed into the dictionary is of type 'System.Collections.Generic.Lis
body: <p>Calling Index view is giving me this very very annoying error . Can anybody tell me what to do about it</p>
  
  <p>Error:
  The model item passed into the dictionary is of type 'System.Collections.Generic.List<code>1[MvcApplication13.Models.Groups]', but this dictionary requires a model item of type 'MvcApplication13.Helpers.PaginatedList</code>1[MvcApplication13.Models.Groups]'.</p>
  
  <p>public ActionResult Index(int? page)
          {
            const int pageSize = 10;
            var group =from p in _db.Groups orderby p.int_GroupId select p;</p>
  
  <pre><code>      var paginatedGroup = group.Skip((page ?? 0) * pageSize).Take(pageSize).ToList();
        return View(paginatedGroup);            
      }
  </code></pre>
  
  <p>View:</p>
  
  >" %>
  
  <p>
      Index
  </p>
  
  <p></p>
  
  <pre><code>&lt;h2&gt;Index&lt;/h2&gt;
  
  &lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;/th&gt;
          &lt;th&gt;
              int_GroupId
          &lt;/th&gt;
          &lt;th&gt;
              vcr_GroupName
          &lt;/th&gt;
          &lt;th&gt;
              txt_GroupDescription
          &lt;/th&gt;
          &lt;th&gt;
              bit_Is_Deletable
          &lt;/th&gt;
          &lt;th&gt;
              bit_Active
          &lt;/th&gt;
          &lt;th&gt;
              int_CreatedBy
          &lt;/th&gt;
          &lt;th&gt;
              dtm_CreatedDate
          &lt;/th&gt;
          &lt;th&gt;
              int_ModifiedBy
          &lt;/th&gt;
          &lt;th&gt;
              dtm_ModifiedDate
          &lt;/th&gt;
      &lt;/tr&gt;
  
  &lt;% foreach (var item in Model) { %&gt;
  
      &lt;tr&gt;
          &lt;td&gt;
              &lt;%= Html.ActionLink("Edit", "Edit", new { id=item.int_GroupId }) %&gt; |
              &lt;%= Html.ActionLink("Details", "Details", new { id=item.int_GroupId })%&gt; |
              &lt;%= Html.ActionLink("Delete", "Delete", new { id=item.int_GroupId })%&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.int_GroupId) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.vcr_GroupName) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.txt_GroupDescription) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.bit_Is_Deletable) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.bit_Active) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.int_CreatedBy) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(String.Format("{0:g}", item.dtm_CreatedDate)) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item.int_ModifiedBy) %&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(String.Format("{0:g}", item.dtm_ModifiedDate)) %&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;% } %&gt;
  
  &lt;/table&gt;
  </code></pre>
  
  
  
     
  
  
  
  
  
     >>", "UpcomingDinners", new { page = (Model.PageIndex + 1) }) %>
  
     
  
  <pre><code>&lt;p&gt;
      &lt;%= Html.ActionLink("Create New", "Create") %&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p></p>