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 6800771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:00:38+00:00 2026-05-26T19:00:38+00:00

Before a page is loaded, I use a subroutine to link DropDownList controls together:

  • 0

Before a page is loaded, I use a subroutine to link DropDownList controls together:

Private Sub CreateCascadingDropDown(ByVal category As String, ByRef parentDDL As DropDownList, ByRef targetDDL As DropDownList)
            Dim CDDL As New CascadingDropDown
            With CDDL
                .Category = category
                If Not parentDDL Is Nothing Then
                    parentDDL.Items.Clear()
                    .ParentControlID = parentDDL.ID
                End If
                targetDDL.Items.Clear()
                .TargetControlID = targetDDL.ID
                .PromptText = SharedWeb.GC_SELECTONE
                .PromptValue = "-1"
                .LoadingText = "Please wait..."
                .ServicePath = "/ajax/InvestmentProcess.asmx"
                .ServiceMethod = "GetTaxo"
            End With
            'Page.ClientScript.RegisterForEventValidation(CDDL.UniqueID)
            targetDDL.Parent.Controls.Add(CDDL)
        End Sub

When the web service method is called, it executes the following code. Based on the category, it gets the appropriate data from the adapter.

<WebMethod()> _
    Public Function GetTaxo(ByVal knownCategoryValues As String, ByVal category As String) As CascadingDropDownNameValue()
        Dim log As ILog = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)
        log.Debug("GetSegmentTaxonomy(" + category + ") -> {" + knownCategoryValues + "}")
        Dim kv As StringDictionary = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues)
        Dim adapter As New SegmentTaxonomyTableAdapters.SEGMENT_ARCHITECTURE_TableAdapter
        Dim rows As DataRowCollection

        Select Case category
            Case InvestmentEdit.ST_SEG_ARCH
                rows = New SegmentTaxonomyTableAdapters.SEGMENT_ARCHITECTURE_TableAdapter().GetData().Rows
            Case InvestmentEdit.ST_LOB
                If kv.ContainsKey(InvestmentEdit.ST_SEG_ARCH) Then
                    log.Debug("found seg architecture - > " + kv(InvestmentEdit.ST_SEG_ARCH))
                    rows = New SegmentTaxonomyTableAdapters.LINE_OF_BUSINESSTableAdapter().GetData(kv(InvestmentEdit.ST_SEG_ARCH)).Rows
                End If
        End Select

        If Not rows Is Nothing Then
            Dim results As New List(Of CascadingDropDownNameValue)
            For Each row As DataRow In rows
                log.Debug("ROW >>>> " + row("lov_label").ToString() + " : " + row("lov_cd").ToString())
                results.Add(New CascadingDropDownNameValue(row("lov_label"), row("lov_cd")))
            Next
            Return results.ToArray
        End If
        Return Nothing
    End Function

There are about 5 drop downs I need to link together. The top-level drop down control (myDDL) loads fine if it is the only one linked like so:

CreateCascadingDropDown("MyCat",Nothing,myDDL)

But when I link a second drop down control, Internet Explorer gives a script timeout. If I keep allowing the script to run, it just keeps giving me the prompt. If elect to discontinue running the script, I get a Method Error 12031 or Error 500 (and yes, I have the ScriptService() declaration in my web service file). Any ideas on what’s causing this?

  • 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-26T19:00:39+00:00Added an answer on May 26, 2026 at 7:00 pm

    It turns out I just needed to add the following control from the Ajax Control Toolkit:

    <ajax:ToolkitScriptManager ID="tsm" runat="server" />
    

    Instead of .TargetControlID = targetDDL.ID I needed to use:

    .TargetControlID = targetDDL.UniqueId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some content in my page is loaded dynamically with the use of this code
I have two controls of interest on a page: a DropDownList and a Button
How can I check for the existence of an aspx page before attempting to
I would like to be able to manipulate the DOM just before my page
I know we've done this before in another .aspx page that's using this master
I need to warn users about unsaved changes before they leave a page (a
Hey guys I have an admin page that checks if you are admin before
What's the best way to insert an element into a page's HEAD directly before
I've seen this done before, but I'm not sure how. When my page loads,
What happens? I'm guessing that somehow the post or page is parsed before displaying,

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.