Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 18, 2012 09:17 PM by bruce (sqlwork.com)
Jan 15, 2008 05:57 AM|LINK
I am wondering how people use JS application for each view.
For example: there's a AssignTask view under Views/Tasks. It should include
My preference is to have this JS file in the same folder as the view itself. But how then I should reference it from the view without fear of changing default controller paths/routing?
Is there something like:
Other options is to store all the JS files in static folder which is always known. This is fine for 3rd party libraries (ExtJS, jQuery etc), but I want to have the JS related to view nearby that view.
Nov 18, 2012 08:40 PM|LINK
My preference is to have this JS file in the same folder as the view itself
My preference is to put on Scripts folder...
But how then I should reference it from the view without fear of changing default controller paths/routing?
@Url.Content("~/relative path to js file")
Nov 18, 2012 09:17 PM|LINK