mvc razor does not reckognize @Html.BeginForm

Vote:
 

Hi 

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?

Thanks

#191104
Apr 20, 2018 8:45
Vote:
 

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.

#191112
Apr 20, 2018 9:06
Vote:
 

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? :)

#191114
Apr 20, 2018 9:16
Vote:
 

Have you looked at this?

https://stackoverflow.com/questions/9634429/html-beginform-with-razor-generator

#191151
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.