Tổng Bài đăng: 11370 Karma: 101402 Đã tham gia: 22/05/2011 Vị trí: United States Compiler Error Message: CS1928: 'System.Web.Mvc.HtmlHelper<Nop.Plugin.MyPlugin.Models.MyModel>' does not contain a definition for 'LabelFor' @model MyModel @using Nop.Web.Framework.UI; @using Nop.Web.Models.Common; @using Nop.Plugin.MyPlugin.Models; @Html.HiddenFor(model => model.Id) <div class="edit-accounttype"> <div class="inputs"> @Html.LabelFor(model => model.AccountTypeId, new { }, ":") ... </div> </div> I've checked my project's web.config and References, and they look similar to that of Payments.Manual (PaymentInfo.cshtml is one of the few out-of-the-box plugins that uses LabelFor) Thoughts?
Tổng Bài đăng: 11370 Karma: 101402 Đã tham gia: 22/05/2011 Vị trí: United States Also complains about @Html.RequiredHint() yet, Html.DropDownListFor and @Html.ValidationMessageFor work fine
Tổng Bài đăng: 897 Karma: 21860 Đã tham gia: 18/04/2011 Vị trí: Poland Test it first without parameters. @Html.LabelFor(model => model.AccountTypeId) Is above would be working?
Tổng Bài đăng: 11370 Karma: 101402 Đã tham gia: 22/05/2011 Vị trí: United States That did it! Thanks. (I probably don't need the extra params right now, but I'm curious as to why the other overload is not available. Thoughts?)