Here i would like to talk about JQuery, what is JQuery, how to use it with asp.net
The advantage of JQuery is, it will support almost all browsers(IE,Chrome,Firefox,Safari,Opera..)
we can download JQuery library from here.
and also some CDNs are also available for Jquery, Google and Microsoft are Providing CDNs for JQuery
Google CDN: <script src=”//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js”></script>
after completing downloading JQuery Library, start working with asp.net by adding JQuery library to Asp.Net Website.
VisualStudio2010 By default include JQuery-1.4.1 in asp.net website and also includes jquery-1.4.1-vsdoc.js file.
This file is for VisualStudio2010 Intellisense. if open this file you can find following content as commented.
* This file has been commented to support Visual Studio Intellisense.
* You should not use this file at runtime inside the browser–it is only
* intended to be used only for design-time IntelliSense. Please use the
* standard jQuery library for all production use.
* Comment version: 1.4.1a
Intellisense works as follows:
We can use jquery-1.4.1.js file for production use.
Open VisualStudio and select File –> New –> Website –> ASP.NET Empty Website –> Enter Some name of website—> Ok.
Now Add New folder and name it as Scripts, and add scripts to this folder and add one webform Default.aspx as follows.
open Default.aspx file and add JQuery-1.7.js file to it and write following code
ready function will rise when DOM is ready to use
in that ready function we can write our code.