All the knowledge is out there, but for people new to jQuery it can be a challenge to make a more or less clean integration in Visual Studio. The key components are the nuget package manager and the script manager component, which often are described separately. Keep in mind there are multiple methods to get a valid jQuery installation, this is just a method that is both easy to install and maintain, and more or less connects with the “aspnet” way of doing things. The method described below uses nuget to install the needed packages for easy updating, and uses the script manager to expose jQuery in your programming environment.
Install the packages
Use the nuget packet manager or console to install the following packages:
Place a script manager
Place a script manager component on the page you want to use jqeury on, as shown below:
<asp:ScriptManager runat="server"> <Scripts> <asp:ScriptReference Name="jquery" /> </Scripts> </asp:ScriptManager> <div>
You can now freely use the jQuery functions in your web page, for example: