Search code examples
asp.net-mvcvb.netapp-code

Does the Helper Module have to be in App_Code for MVC to recognize when using VB.net


When I have my Helpers in the App_Code Directory of my APS.NET MVC VB Application, I can type <%=HTML.ImageUrl("myImage.gif")%>

If I move it to another folder I get Errors. I assume I can import the Application Namespace to get it to work, but is that necessary?


Solution

  • Do you have the namespace your using put into the web.config?

    <pages>
         <namespaces>
              <add namespace="Your.Name.Space" />
         </namespaces>
    </pages>