0
CS0234:類型或命名空間名稱「助手」不存在命名空間「UTEPSA」存在(是否缺少程序集引用?)如何強制輸入View繼承的內容?
這裏是一個正試圖繼承視圖代碼:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<UTEPSA.Helpers.PaginatedList<Area>>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Index</h2>
<table>
<tr>
<th></th>
<th>
ID
</th>
<th>
IDJefe
</th>
<th>
Nombre
</th>
</tr>
<% foreach (var item in Model) { %>
<tr>
<td>
<%: Html.ActionLink("Edit", "Edit", new { id=item.ID }) %> |
<%: Html.ActionLink("Details", "Details", new { id=item.ID })%> |
<%: Html.ActionLink("Delete", "Delete", new { id=item.ID })%>
</td>
<td>
<%: item.ID %>
</td>
<td>
<%: item.IDJefe %>
</td>
<td>
<%: item.Nombre %>
</td>
</tr>
<% } %>
</table>
<p>
<%: Html.ActionLink("Create New", "Create") %>
</p>
</asp:Content>
和我的解決方案的屏幕截圖:
如何正確引用我的PaginatedList?由於視圖是從我想要的東西繼承而來的,因此我希望強制鍵入Model來處理。但intellisense並不適合所有的事情都是錯誤的。
你有正確的代碼,你的引用你的PaginatedList的方式肯定有問題。確保你的所有名字空間都是正確的。 – 2010-08-09 23:54:42