Link to home
Start Free TrialLog in
Avatar of mathies
mathies

asked on

Dropdownlist OnChange event

How can I trap a ChangeItem event of a Databound Dropdownlist control in ASP.net
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

use the onselectedIndexchanged method,

You can invoke it like:

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

Fritz the Blank
typo, should be:

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

ASKER

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!
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
ASKER CERTIFIED SOLUTION
Avatar of YensidMod
YensidMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial