JQuery is a JavaScript library. It is helpful and make easy to handle HTML DOM (Document Object Model), Events and Animation and Ajax functionalities. JQuery reduce code compared to JavaScript. Mostly we use JQuery or JavaScript for client side activities and make Ajax call to ASP.NET Web form/mvc, Web service and WCF.
JQuery VS JavaScript link:
There following ways to incorporate JQuery in your projects.
- NuGet: While you use this on your project
Select Tools, Library Package Manager, then Manage NuGet packages for solution
Search and Install: JQuery .

- Manually download JQuery of your selected version and attached to Visual Studio.
- <script src="Scripts/JQuery -?.?.?.min.js" type="text/javascript"></script>
- CDN - Content Delivery Network.
It is directly delivered from google or Microsoft server.
For example,
- <script src="//ajax.googleapis.com/ajax/libs/JQuery /?.?.?/JQuery .min.js" type="text/javascript"> </script>
Always use minified version: like JQuery -?.?.?.min.js because it is fast to load and lightweight.
The following are the commonly used server control in which mostly we want to set and get value from JQuery .
| Control ID | SET Value | GET Value |
| Label | $('#<%=lblSerialNo.ClientID%>').text("101"); | $('#<%=lblSerialNo.ClientID%>').text(); |
| TextBox | $('#<%=txtFriendName.ClientID%>').val("Rajesh "); | $('#<%=txtFriendName.ClientID%>').val(); |
| DropDownList | $('#<%=ddlGender.ClientID%>').val(); | |
| CheckBox | $('#<%=chkIsMarried.ClientID%>').attr('checked'); |
CHECKBOX
Check the status:
- $('#<%=chkAdult.ClientID%>').attr('checked',true);
- $('#<%=chkAdult.ClientID%>').attr('checked',false);
Get Radiobutton status:
- $('#<%=rboSeatType.ClientID%>').attr('checked');
- Disable any server control:
- $('#<%=txtRemarks.ClientID%>').attr('disabled', true);
- Enable any server control:
- $('#<%=txtRemarks.ClientID%>').attr('disabled', false);


Manoj KallaPosted Apr 18, 2016, 11:49 PM EDT
Thank You, Humayun
Humayun Kabir MamunPosted Apr 18, 2016, 8:53 PM EDT
Nice...
Santhakumar MunuswamyPosted Jan 8, 2016, 9:33 PM EST
Thanks for nice article.
Debasis SahaTOP 100Posted Jan 6, 2016, 6:56 PM EST
Good One..
Pankaj Kumar ChoudharyTOP 100Posted Jan 6, 2016, 7:56 AM EST
Nice Information..........