troubleshooting Question

DropDownList in <EditItemTemplate>

Avatar of acsakany
acsakany asked on
C#
6 Comments1 Solution904 ViewsLast Modified:
I have the following

<EditItemTemplate>
    <tr style="">                    
        <td><asp:DropDownList ID="stateDropDown" DataTextField="stateName" DataValueField="stateID" DataSource='<%# GetStates(Eval("countryID").ToString()) %>' selectedValue='<%# Eval("stateID") %>' AutoPostBack="true"  runat="server"></asp:DropDownList></td>                    
        <td><asp:DropDownList ID="countryDropDown" DataTextField="countryName" DataValueField="countryID" DataSource='<%# GetCountries() %>' selectedValue='<%# Eval("countryID") %>' OnSelectedIndexChanged="changerStates" AutoPostBack="true" runat="server"></asp:DropDownList></td>
    </tr>
</EditItemTemplate>


When the country is changed in the countryDropDown I want to change the states but the C# does not recognize the statesDropDown in the current context. Is there a way to get this done?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros