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

  • SEARCH
  • Home
  • 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 4247302
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:05:22+00:00 2026-05-21T04:05:22+00:00

I am using asp.net 3.5 with the ajax toolkit. The problem: I have a

  • 0

I am using asp.net 3.5 with the ajax toolkit.

The problem: I have a custom control with two drop down lists in an update panel. The first DDL has the property AutoPostBack="true" and upon selection the second DDL is populated. The issue is the first time after initial page load the DDL is selected, the entire page reloads. The second time an item in the first DDL is selected, everything works as expected.

I have tried adding Triggers in the UpdatePanel, but that does not change the outcome.

Any help is appreciated.

.ascx:

<asp:UpdatePanel ID="popDates" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <p>
                    <asp:DropDownList ID="ddlDivision" runat="server" AutoPostBack="true" style="width:300px"></asp:DropDownList>
                    <asp:RequiredFieldValidator ID="requiredDivision" runat="server" 
                                ControlToValidate="ddlDivision" ErrorMessage="* Please specify a value" 
                                ValidationGroup="valGroupGetDates"
                                InitialValue="Select..." SetFocusOnError="True" CssClass="formValidation">
                    </asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:DropDownList ID="ddlKMA" runat="server" Enabled="False" AutoPostBack="true" style="width:300px"></asp:DropDownList>
                    <asp:RequiredFieldValidator ID="requiredKMA" runat="server" 
                                ControlToValidate="ddlKMA" ErrorMessage="* Please specify a value" 
                                ValidationGroup="valGroupGetDates"
                                InitialValue="Select..." SetFocusOnError="True" CssClass="formValidation">
                    </asp:RequiredFieldValidator>
                </p>
            </ContentTemplate>
            </asp:UpdatePanel>

ascx.cs:

protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsAsync || Page.IsPostBack)
            {
                String target = Page.Request.Params.Get("__EVENTTARGET");
                //Division Session                
                Session["divisionDropDown"] = ddlDivision.SelectedItem.Value;
                populateDivisionDDL();
                ddlDivision.SelectedValue = Session["divisionDropDown"].ToString();

                if (target != "" && target != null)
                {
                    if (target.Contains("ddlDivision"))
                    {
                        populateKMA(ddlDivision.SelectedValue);
                    }
             }
            }

            if (!Page.IsPostBack)
            {
                populateDivisionDDL();
                ddlKMA.Items.Clear();
                ddlKMA.Items.Add(default_item());
            }
        }
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
    }

aspx:

<body>
    <form id="ViewSPANodeDatesForm" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManagerDates" runat="server"></asp:ScriptManager>
        <viewControl:SPANodeDates ID="SPANodeDates1" runat="server"></viewControl:SPANodeDates>
    </div>
    </form>
</body>

Note: Before adding the ajax controls, everything worked as expected.

Thanks!

  • 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-21T04:05:23+00:00Added an answer on May 21, 2026 at 4:05 am

    here you have three examples of cascading dropdownlist using controller and webservice.

    http://stephenwalther.com/blog/archive/2008/09/07/asp-net-mvc-tip-41-creating-cascading-dropdown-lists-with-ajax.aspx

    I can paste the whole info but I believe the link will be better. even stephen offer code example of it.
    brgds.

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

Sidebar

Related Questions

I'm using the ASP net Ajax toolkit and have a GridView within the UpdatePanel
I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing
Here's the specs: ASP.NET 3.5 using ASP.NET AJAX AJAX Control Toolkit jQuery 1.3.2 web
I have an interesting problem when using partial page update in asp.net with scriptmanager
I currently have an Instance of the ASP.net ajax control toolkit combo box residing
I am using ASP.NET Ajax control toolkit v3.5 TabContainer control. Anytime I use the
Can you do ajax on ASP.net webform without using ajax toolkit? (Please post a
Using the client-side ASP.NET AJAX library, I have created an instance of a client
I am using asp.net MVC to develop an application that will have ajax interactions.
I am using MS AJAX ASP.NET Components (Calendar Extender) and I'm finding this problem.

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.