【问题标题】:Partial View doesn't see that BeginForm is part of HtmlHelper部分视图没有看到 BeginForm 是 HtmlHelper 的一部分
【发布时间】:2012-06-27 18:39:04
【问题描述】:

在我的主应用程序中,我想将插件 DLL 中的部分视图加载到主视图中。现在我使用@Html.Partial(/~bin/PluginName.dll/PluginName.ViewName.vbhtml) 作为我尝试查看部分视图的方式。这是我得到的错误:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\root\b3a37fd6\7fe17e9b\App_Web_cucontractnumberplugin.cucontractnumbersearch.vbhtml.1
45470.d2zb2yt5.0.vb(43): error BC30456: 'BeginForm' is not a member of 
'System.Web.WebPages.Html.HtmlHelper'.

我有一个类可以在应用启动时将 dll 加载到影子目录中。在我的部分视图中(目前)所有的都是一个文本框。我最终想将搜索插件加载到我的主视图中。

这是我的部分观点:

@using(Html.BeginForm("ChangeCUNumber", "PluginName"))

@Html.TextBox("strCUNumber")


End Using

如果您需要任何澄清,请询问!谢谢!

【问题讨论】:

    标签: asp.net-mvc-3 razor mef partial-views


    【解决方案1】:

    需要在我的插件视图中添加@Inherits System.Web.Mvc.WebViewPage

    【讨论】:

      猜你喜欢
      • 2013-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多