I installed the necessary libraries for the button to work. enter image description here
I got an error. enter image description here
I added the jquery source file to the page using the drag and drop method. enter image description here
I got an error. enter image description here
How can I upload the jquery library or javascript library (non-CDN) to my page? Can you help me?
Thanks.
So, is there an explanation why we cannot run it in the second example?
The short answer is, the jquery file is request from the client side and client's browser will firstly download it to the client browser's cache and then use it.
If you directly using the computer path to access the file which means the client has the permission to access all the file inside that path. An attacker could potentially use this to access sensitive files or information on the server, which could lead to data breaches or other malicious activities.
So we suggest you put the file inside the wwwroot folder which is design to abstract away the actual file system structure.
More details, you could refer to this article to understand how and why static file middleware works.