I have converted my classic asp.net mvc views to razor. In a view there is a usage of an extension method (it has overloads) of HtmlHelper:
@Html.CustomAction<AccountController, LogOnModel>("displayText", x => x.Register())
And CustomAction signature is:
public static HtmlString CustomAction<TController, TModel>(this HtmlHelper<TModel> view, string displayText, Expression<Func<TController, object>> where TController : Controller
I have also enabled view compilation at build time (through .proj file). When I build the project I get these errors pointing to that line:
Argument 1: cannot convert from 'method group' to 'System.Web.WebPages.HelperResult'
The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
What is the reason of these errors? How can I correct it?