I'm writing a razor template for a custom module, and I'm trying to put in a regular old boring form, that submits to an external url.
When trying to use the html helpers for a label, @Html.LabelFor, I'm receiveing a compiler error that it's an ambiguous call. I then checked the Orchard source to notice that Orchard redefines all the common html helper methods, including LabelFor.
The affected line is:
@Html.LabelFor(q => q.DepartureDate, "Departure Date")
I've removed the namespacing for my model from the compiler error message to simplify things (Quote is my model class):
Compiler Error Message:
CS0121: The call is ambiguous between the following methods or properties: 'Orchard.Mvc.Html.HtmlHelperExtensions.LabelFor<Quote,string>(System.Web.Mvc.HtmlHelper<Quote>, System.Linq.Expressions.Expression<System.Func<Quote,string>>,
and 'System.Web.Mvc.Html.LabelExtensions.LabelFor<Quote,string>(System.Web.Mvc.HtmlHelper<Quote>, System.Linq.Expressions.Expression<System.Func<Quote,string>>,
Is there something I'm missing on how to resolve the ambiguity? I'd expect this error since the methods are redefined with the same signatures, so there's obviously something I'm missing.
I've tried adding using statements for "Orchard.Utility.Extensions" to no avail, I've also checked that all projects are referencing the same System.Web.Mvc dll in the orchard directory just in case.