asp.net-mvcasp.net-mvc-3razormvccontribfluenthtml

MvcContrib FluentHtml With Razor?


I'm wondering does the latest release of MvcContrib work with the Razor view engine? I referenced the MvcContrib assembly and the FluentHtml assembly, then I added the required namespace to the ~/View/Web.config as suggested here by Darin. But still, no matter how much I try use the FluentHtml extensions in my views, it doesn't work. (nothing shows up in intellisense when I start with a dot after the html helper)

Am I missing anything?

P.S: this is the first time I use MvcContrib.


Solution

  • I wrote a short blog that post covers using FluentHtml with Razor.

    Regarding intellisense, you will only get intellisense for FluentHtml methods on "@this." (not "@Html.") and it only list the strong-typed helpers on views that implement IViewModelContainer<T> (such as ModelWebViewPage<T>). Another possible issue is Resharper. There is a workaround for that.