ASP.NET MVC Using Multiple user controls on a single .aspx(view)
Posted
by Pinu
on Stack Overflow
See other posts from Stack Overflow
or by Pinu
Published on 2010-04-26T20:31:40Z
Indexed on
2010/04/27
15:03 UTC
Read the original article
Hit count: 223
asp.net-mvc
I am getting this following error , when i am tring to having two user controls in one page.
The model item passed into the dictionary is of type 'System.Linq.EnumerableQuery1[Data.EventLog]' but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable
1[Data.Notes]'.
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Test
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Test</h2>
<% Html.RenderPartial("~/Views/Shared/UserControl/Tracking.ascx"); %>
<% Html.RenderPartial("~/Views/Shared/UserControl/Notes.ascx"); %>
</asp:Content>
© Stack Overflow or respective owner