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

假如想象 提交于 2019-12-25 09:32:22

问题


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


回答1:


RequireJs and RequiresCss and features of Clientdependency

http://clientdependency.codeplex.com/



来源:https://stackoverflow.com/questions/14605109/what-is-the-purpose-of-library-registration-and-does-it-make-any-difference-if-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!