I need help with the below error. It cant seem to find the WarehouseJavascript.js file which is outside the scripts folder.


I need help with the below error. It cant seem to find the WarehouseJavascript.js file which is outside the scripts folder.


 
    
     
    
    The URL /Views/Warehouse/WareHouseJavascript.js is invalid, because you have to make request to controller instead of view.
So you should do following:
@Url.Action('Warehouse','Index') assuming that controller name is Warehouse nad action is Index 
    
    In your Views folder there should be a web.config file. In it, find the system.web/httpHandlers section, and a static file handler line before the wildcard 404 handler line per the answer here: https://stackoverflow.com/a/6453724/426894
<httpHandlers>
  <add path="*.js" verb="GET,HEAD" type="System.Web.StaticFileHandler" />
  <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>