How exactly do you get ReCaptcha work in MVC3 with razor? I tried “Install-Package microsoft-web-helpers” but still could not get it to work on my .cshtml razor page, it cannot find the type ReCaptcha. And, on http://nuget.org/List/Packages/microsoft-web-helpers someone left comment saying “This package currently works with WebMatrix only”. While this article shows it may work http://www.dotnetcurry.com/ShowArticle.aspx?ID=611
How exactly do you get ReCaptcha work in MVC3 with razor? I tried Install-Package
Share
You might need to make the
Microsoft.Web.Helpersnamespace available to the views. In your Web.config (the one in yourViewsfolder) add:Then you can use the following helper in your view:
If the namespaces setting doesn’t work, you could try to add
@using Microsoft.Web.Helpersstatement on top of the view to see if that helps. If it does, you’ll have to try and find out why the namespace setting in the web.config isn’t working…