What is the purpose of library registration and does it make any difference if I they are just added to the project?

StackOverflow https://stackoverflow.com/questions/14605109

Question

I am integrating the jquery file upload plugin in my asp net mvc 4 project. I have got a asp net mvc 3 implementation and it works as I could test it.

When I add all js, css, c# and view files to my project, I loads but I don´t see any changes when trying to select/upload a file.

As I could notice, the input file in bound to a onChange event that should trigger when a file is selected. But it is not.

Html.RequiresJs("jquery/1.7.1/jquery.min.js", "googleCDN", 1);
Html.RequiresCss("Bootstrap/bootstrap.min.css", "Content", 2);

There are plenty of them. Also I have add thos files in the proper folders and add to a bundle so it is loading as soon as the application starts. (I could verify that either.)

Yet I am unable to find the reason those events are not triggering. What is exactly the purpose of those registrations? Does it have some impact if they are not registred and just add to my project as I stated before?

The plugin is that:

https://github.com/blueimp/jQuery-File-Upload#download

Was it helpful?

Solution

RequireJs and RequiresCss and features of Clientdependency

http://clientdependency.codeplex.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top