【问题标题】:MvcContrib.Mvc3-ci 3.0.75.0 breaking change?MvcContrib.Mvc3-ci 3.0.75.0 重大变化?
【发布时间】:2011-09-27 05:36:58
【问题描述】:

刚从 MvcContrib.Mvc3-ci 3.0.73.0 更新到 3.0.75,之前正常工作的普通 ViewUserControl 抛出了运行时异常:

The model item passed into the dictionary is of type 'System.String', but this dictionary requires a model item of type 'MvcContrib.UI.InputBuilder.Views.PropertyViewModel`1[System.Object]'.

“违规”编辑器从模型中获取纯字符串:

<%: Html.EditorFor(m => m.Model.NEV) %>

恢复到 3.0.73.0,编辑器再次工作。有任何想法吗? (3.0.74.0 似乎也可以工作)

【问题讨论】:

  • 投票关闭过于本地化,这属于 MvcContrib 论坛/问题列表。

标签: asp.net-mvc-3 mvccontrib


【解决方案1】:

我遇到了同样的问题并解决了它恢复到版本:3.0.73.0

Uninstall-Package MvcContrib.Mvc3-ci -Force
Install-Package MvcContrib.Mvc3-ci -version 3.0.73.0

【讨论】:

  • 我在 3.0.100.0 版本中遇到了这个问题
【解决方案2】:

我遇到了同样的错误。看来,如果您使用 EditorFor 以外的任何东西,它就可以正常工作。 因此,如果您知道需要渲染哪个 HTML 编辑器,请使用它(例如 @Html.TextAreaFor(x => x.Model.NEV)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-24
    • 1970-01-01
    • 1970-01-01
    • 2021-08-01
    相关资源
    最近更新 更多