What is the purpose of library registration and do

2019-09-06 15:08发布

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条回答
Bombasti
2楼-- · 2019-09-06 15:51

RequireJs and RequiresCss and features of Clientdependency

http://clientdependency.codeplex.com/

查看更多
登录 后发表回答