Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
get_selectedItem().get_value(); is Null


I am trying to call javascript method for OnBlur client of webdropdow.

I want to clear the text of webdropdown if user types something and click tab... in case if they didn't selected any of the dropdown value.

wddValue =$find('<%= WebDropDown1.ClientID %>').get_selectedItem().get_value();

I'm getting get_selectedItem()   as null.


What am I doing wrog?

Is there any short method to achieve what i'm trying to do?


  • 37874

    Hi siddhu2000,

    I would suggest that you use get_currentValue() which would return the value in the textbox of the control. While get_selectedItem() returns null if you haven't selected any item from the dropdown items collection.

    Please let me know if you have any further questions.

Reply Children
No Data