我找不出在下面的代码中缺少的内容。我有一个应该添加一个(假)辅助扩展的方法:无法在VB MVC应用程序中创建HtmlHelper方法
Imports System.Runtime.CompilerServices
Namespace HtmlHelpers
Public Module HelpExtensions
<Extension()> _
Public Function HelpMe(ByVal HtmlHelper As HtmlHelper) As String
Return "<a>HELP</a>"
End Function
End Module
End Namespace
我的看法是这样的:
<%@ Page Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="HtmlHelpers" %>
<asp:Content ID="indexContent" ContentPlaceHolderID="body" runat="server">
<%=Html.HelpMe()%>
</asp:Content>
但是这给了我以下错误:
'HelpMe' is not a member of 'System.Web.Mvc.HtmlHelper'.
我在做什么错?
这应该只是在VS环境中的一个错误,但它应该运行良好,我们一直这样做。 – 2015-08-22 12:44:01