[英]'System.Web.Mvc.HtmlHelper' has no applicable method named 'Partial'
[英]Unable to cast the object type “System.Web.Mvc.HtmlHelper` 1 [System.Object] ”to type“ System.Web.Mvc.HtmlHelper ”
我在我的 mvc asp.net 項目中使用 DevExpress 控件。 這是視圖的代碼:
<div>
@Html.DevExpress().TextBox(settings =>
{
settings.Name = "TextBox";
settings.Width = 170;
settings.Properties.DisplayFormatString = "[ 00 - 00 - 00 ]";
settings.Text = "123456";
}).GetHtml()
</div>
這是錯誤消息:
Unable to cast the object type "System.Web.Mvc.HtmlHelper` 1 [System.Object]" to
type "System.Web.Mvc.HtmlHelper"
我無法理解我的代碼在哪里失敗,因為它是來自 DevExpress 演示的示例代碼。
Ty 鏈接,Nitin Varpe。 我將此部分添加到我的主 web.config 中:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.