Call Jquery Function from dropdownlist in asp .net

In this asp .net tutorial we will learn how to call Jquery function from Dropdownlist. Dropdownlist is very useful control when we have to select single item from list of Items. In this article we will call Jquery function whenever user selects any element in the Dropdownlist.


Lets create a sample asp .net application:


Step1: Create a new asp .net website.


Step2: Add jquery in your head section of page. Here in this example I am using CDN to add Jquery. You can use CDN for Jquery or you can use local copy of Jquery.





Step3: Create a new dropdownlist in your asp .net page.






In this tutorial I have used static values for Dropdownlist, However you can also bind dropdownlist with database.


Step4: Place this code between head tag(If you are using Masterpage then in ContentPlaceHolder  used for Head) of the page.






The above code will fire each time when selection is made by user and it will display Text of selected item. 


Tip: Add search functionality into asp .net dropdownlist.


Call Jquery Function from dropdownlist in asp .net

Asp.Net Ajax Control Toolkit tutorials.

Give your valuable comments.

3 + 6 =

About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2024 CodingFusion
50+ C# Programs for beginners to practice