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