force SelectedIndexChanged event

Posted on 2006-05-31
Last Modified: 2012-08-13
I have a dropdown list that has a SelectedIndexChanged event to populate another dropdownlist. This works fine except for the initial page load. Apparently the SelectedIndexChanged does not fire when the first dropdownlist is populated (via SQL).

Is there a way to force this event in code? The Sub has (sender As Object, e As EventArgs) and I don't know how to code it to fire.

Thanks for the help.
Question by:mfony
    LVL 18

    Accepted Solution

    DropDownList1_SelectedIndexChanged(DropDownList1, New System.EventArgs)
    LVL 28

    Assisted Solution

    create a function to call from your SelectedIndexChanged function. Then you can call this same function on page_load when after you populate the DropDownList1
    LVL 4

    Assisted Solution

    make sure that u have set AutoPostBack property of the drop down to true

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now