-1

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

error

ref

2

2 Answers 2

0

The URL /Views/Warehouse/WareHouseJavascript.js is invalid, because you have to make request to controller instead of view.

So you should do following:

  1. Create controller for Warehouse it is not already exist (I cannot see it on your printscreen)
  2. Create action method for above view
  3. In action method return view WareHouseJavascript
  4. In link use @Url.Action('Warehouse','Index') assuming that controller name is Warehouse nad action is Index
Sign up to request clarification or add additional context in comments.

Comments

0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.