0
I am getting this following error , when i am tring to having two user controls in one page.
传递到词典中的模型项的类型为 'System.Linq.EnumerableQuery 1[Data.EventLog]' but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable
1 [Data.Notes]'。ASP.NET MVC在单一的.aspx使用多个用户控件(视图)
<%@ 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>
我其实是新手,请给我一个这样的例子吗?谢谢 – Pinu 2010-04-27 14:18:58
现在添加的例子。 – 2010-04-27 15:02:08
谢谢,我欣赏它:-) – Pinu 2010-04-28 14:49:40