Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5983983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:18:32+00:00 2026-05-22T22:18:32+00:00

There is a drop down list bind with datasource -> Called This DropDownList A

  • 0

There is a drop down list bind with datasource -> Called This DropDownList A
This datasource get another parameter from another dropdownlist -> Called This DropDownList B

Everytime DropDownList B Change the selected value, Datasource of Dropdownlist A will receive the parameter and change dropdownlist A.

Whenever DropDownlist change its index, it will cause postback and the selected value will be reset to the first index (default).

After Switching DropDownList A to use a datasource with no parameter. This problems is not occur.
After DropDownList A has changed its value and postback, the recenly changed value still there.

I have tried using update panel but it still is not work either.

This is DropDownList B, Add On Type

                                    <asp:DropDownList ID="ddlAddOnType" runat="server" AppendDataBoundItems="True" 
                                        AutoPostBack="True" ClientIDMode="Static" CssClass="controlOrdinary" 
                                        DataSourceID="odsAddOnType" DataTextField="AddOnTypeName" 
                                        DataValueField="AddOnTypeId" 
                                        onselectedindexchanged="ddlAddOnType_SelectedIndexChanged" Width="208px">
                                        <asp:ListItem Value="0">--Please Select--</asp:ListItem>
                                    </asp:DropDownList>

This is datasource for dropDownlist A

                            <asp:ObjectDataSource ID="odsAddon" runat="server" 
                                SelectMethod="SelectAddOnThatIsNotInCurrentPromotionWithAddOnByAddOnTypeId" 
                                TypeName="BackOfficeLib.SupportAdmin.PromotionBinder">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddlAddOnType" Name="pIntAddOnTypeId" 
                                        PropertyName="SelectedValue" Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>

This is dropdownlist A, when this one change the value, the page being post back suddenly and the index is reseted.

                                    <asp:DropDownList ID="ddlAddOn" runat="server" AppendDataBoundItems="True" 
                                        AutoPostBack="True" ClientIDMode="Static" CssClass="controlOrdinary" 
                                        DataTextField="AddOnName" DataValueField="AddOnId" 
                                        onselectedindexchanged="ddlAddOn_SelectedIndexChanged" Width="208px">
                                        <asp:ListItem Value="0">--Please Select--</asp:ListItem>
                                    </asp:DropDownList>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:18:33+00:00Added an answer on May 22, 2026 at 10:18 pm

    The solution i use is keeping value in hidden field by javascript, using onchange event ( change the first drop down list)

    This asp.net ajax control provide some help.

    http://www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a drop down list that is populated in the page load event
So basically I am trying to validate my drop down list (combobox) using the
My form has a drop down list for state names. When the user submits
Are there any professional Combobox controls (dropdown list with autosuggestion) based on the jQuery
Is there anyway to have items in an ASP.NET DropDownList have either their Text
is there a way to make the datatextfield property of a dropdownlist in asp.net
Is there a client event that I can use for when a DropDownList's data
Is there some elegant way to add an empty option to a DropDownList bound
Is there a way to control the number of displayed rows in a DropDownList
Is there drop-in replacement for ActiveRecord that uses some sort of Object Store? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.