This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17936|Reply: 0

[ASP.NET] "System.Web.Mvc.HtmlHelper" does not contain the definition of "TextBox"

[Copy link]
Posted on 3/8/2018 5:13:30 PM | | | |
Compiler error message: CS1061: 'HtmlHelper<object>' does not contain a definition for 'TextBox' and no extension method 'TextBox' accepting a first argument of type 'HtmlHelper<object>' ' could be found (are you missing a using directive or an assembly reference?)



Error 13 "System.Web.Mvc.HtmlHelper" does not contain the definition of "TextBox" and cannot find the extension method "TextBox" for the first parameter of the acceptable type "System.Web.Mvc.HtmlHelper" (is the using directive or assembly reference missing?)

Solution

Modify the Web.config,Add the namespace <add namespace="System.Web.Mvc.Html"/> as follows








Previous:System.Linq.Dynamic
Next:linq sum source is empty
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com