I created a partial view and can't access the Html namespace for HTML Helpers. It's available in the main view. Am I missing something?
EDIT: I should mention that I'm using ASP.NET MVC 5.
check is there a web.config in you views directory and in the web.config
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With