directxBOB
asked on
Cascading Drop Down : Selecting Value from Code Behind
I've been working with Cascading Drop Down's, which work great, but I would like to be able to select a value from the first drop down, have it populate and then select the other value from the second drop down. All from codebehind.
Anyone have any ideas on how to get this working?
Anyone have any ideas on how to get this working?
I do it like this:
If Not Session("CountryID") Is Nothing Then mCountryDropDownList_CascadingDropDown.SelectedValue = Session("CountryID")
Here's my DDL
=============
<asp:DropDownList ID="mCountryDropDownList" runat="server" style="width: 155px" CssClass="Form">
</asp:DropDownList>
<cc2:CascadingDropDown ID="mCountryDropDownList_CascadingDropDown"
runat="server" Category="Country" LoadingText="Fetching list... please wait..."
PromptText="- Country -" ServiceMethod="GetCountry"
ServicePath="~/AreaMainService.asmx"
Enabled="True" TargetControlID="mCountryDropDownList">
</cc2:CascadingDropDown>
ASKER
Where are you putting :
If Not Session("CountryID") Is Nothing Then
mCountryDropDownList_Casca dingDropDo wn.Selecte dValue = Session("CountryID")
I have put this in my PageLoad but it's not working.
If Not Session("CountryID") Is Nothing Then
mCountryDropDownList_Casca
I have put this in my PageLoad but it's not working.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://csharpdotnetfreak.blogspot.com/2009/03/populate-dropdown-based-selection-other.html