We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to retrieve the selected value from server-side event in the DropDownList control?

To get the selected item value of the DropDownList control on the post back, use the server-side OnValueSelect event of the DropDownList, so that you can access the DropDownList data in the code behind. The OnValueSelect server-side event triggers the post back when the value of the DropDownList item is changed and maps to the corresponding event handler in the code behind. In the server-side event handler, you can access the value, ID, text, and checked state details by using the DropdownListEventArgs variable. Refer to the following code example.






Article ID: Published Date: Last Revised Date: Platform: Control: Product Version:
3660 01/31/2015 09/18/2015 ASP.NET Web Forms DropDownList
Did you find this information helpful?
Ryan How Feb 11, 2015
I've tried this code, but the server side event is never executed. The page simply reloads. The event is hooked up because if I change the method names then I get exceptions. I can however read the value of DropDownList1.Value to get the selected value in other methods.
Ezhil S [Syncfusion] Feb 11, 2015
Hi Ryan, Yes, You can get the values using the DropDownList properties in code behind. Same way you can also get the DropDownList Value details using OnValueSelect event arguments. We are unable to reproduce the reported issue with the details provided by renaming the Event name.Please check the online sample demo link: http://asp.syncfusion.com/demos/web/dropdownlist/event.aspx We have also attached sample that works fine. Modify our sample or attach defect sample to check the issue. Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/Menu_135192-671257844.zip Kindly let us know if you have further queries. Regards, Ezhil S
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon