且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么不是我的HtmlHelper扩展工作?

更新时间:2023-01-23 17:24:01

检查,以确保您的扩展的命名空间是我们的视图访问。您需要使用这个在您的视图:

Check to make sure that the namespace of your extensions is accessible to our view. You need either this in your view:

<%@ Import Namespace="MyRootNamespace.NamespaceForMyHtmlHelperExtensions"%>

这还是在你的web配置的命名空间部分:

or this in your web config namespaces section:

<add namespace="MyRootNamespace.NamespaceForMyHtmlHelperExtensions"/>