SaaS CMS has officially launched! Learn more now.

mvc razor does not reckognize @Html.BeginForm



I looking into an admin addon. 

It is created with mvc razor.

But when I try yo use @using (Html.BeginForm from a view i get the following error:

System.Web.Mvc.HtmlHelper<"model">' does not contain a definition for 'BeginForm' and no extension method 'BeginForm' accepting a first argument of type

Can anyone point me in the right direction?


Apr 20, 2018 8:45

Have you upgraded your version of MVC? It might be that the web.config that resides in your Views folder have old/wrong MVC references. A tip in that case could be to create an new empty MVC project and then take the web.config from the Views folder from that new project and replace your existing.

Apr 20, 2018 9:06

Hej Johan,

Just tried that without success.

I have upgraded system.web.mvc from 5.2.3 to 5.2.4 but that doesn't change in the Views web.config so i manually tried to replace there as well without success.

Any other suggestions? :)

Apr 20, 2018 9:16

Have you looked at this?

Apr 20, 2018 22:24
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.