Dropdownlist OnChange event

mathies
mathies used Ask the Experts™
on
How can I trap a ChangeItem event of a Databound Dropdownlist control in ASP.net
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2005

Commented:
use the onselectedIndexchanged method,

You can invoke it like:

<asp: dropdownlist id="someName" ruant="server" onselectedIndexchanged="YourSubOrFunctionHere">

Fritz the Blank
Top Expert 2005

Commented:
typo, should be:

<asp: dropdownlist id="someName" runat="server" onselectedIndexchanged="YourSubOrFunctionHere">

Author

Commented:
This code doesn't work if your control is link to as data set!

I need to refresh a second dropdown list control based on the change of another control!
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Top Expert 2005

Commented:
This might help:

http://www.aspfree.com/authors/Mohammed_Mudassir/nomoreremotescripting.aspx

You will just need to change the second control, but this might get you started at least.

Fritz the Blank
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[PAQ with NO REFUND]

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

hongjun
EE Cleanup Volunteer
Question is PAQ and points refunded.

YensidMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial