asp.net mvc 4 - MVC 4 - 'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for -


yes i've searched rest of s.o. solution, none of solutions worked me. here's issue:

1) visual studio 2012 -> new web site...

2) create normal mvc 4 site (razor v2) , .net 4.5

3) add following code default.cshtml

@using (html.beginform()) {  } 

4) launch , error:

cs1061: 'system.web.webpages.html.htmlhelper' not contain definition 'beginform' , no extension method 'beginform' accepting first argument of type 'system.web.webpages.html.htmlhelper' found (are missing using directive or assembly reference?) 

what gives?

edit, uploaded website here zip, 276k: http://budzap.com/mvc.zip

this message says version of system.web.mvc not support beginform.it may have many causes.to find out cause problem,you can try 1 of this:

  • it usaually caused deleting second web.confing resides in view folder.see this

  • see version of system.web.mvc in references of project.it might old version doesnot support beginform.

  • add system.web.mvc.html before beginform see if there such method.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -