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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:04:57+00:00 2026-05-13T23:04:57+00:00

Consider the following: dim dropdownlist1 as new dropdownlist dim dropdownlist2 as new dropdownlist dim

  • 0

Consider the following:

dim dropdownlist1 as new dropdownlist
dim dropdownlist2 as new dropdownlist
dim dropdownlist3 as new dropdownlist

dropdownlist1.AutoPostBack = true
dropdownlist2.AutoPostBack = true
dropdownlist3.AutoPostBack = true

AddHandler dropdownlist1.SelectedIndexChanged, AddressOf SomeEvent
AddHandler dropdownlist2.SelectedIndexChanged, AddressOf SomeEvent
AddHandler dropdownlist3.SelectedIndexChanged, AddressOf SomeEvent

Edit:
I want an event to fire no matter which dropdown is selected.
Edit:

The SomeEvent fires as expected when any of the dropdown’s selection is changed. However if say DropdownList2 has a selection made then I make a selection with either DropDownList1 or DropdownList3, then SomeEvent fires again. What is causing this behavior and how do I get just a single raising of that event?

I suspect that when the viewstate for the dynamcially created dropdownlists is restored and the selection restored, then the event is fired because technically the selected index did change when the control was recreated. The reason I suspect this is that the event fires the for each 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-13T23:04:57+00:00Added an answer on May 13, 2026 at 11:04 pm

    The event will fire when the value of that property is changed programatically after the event is wired up. This is likely the cause of multiple calls of the function. This is why you need to add any event handlers after the viewstate is loaded. Try looking at the stack trace for each time the method is called to find where this is happening.

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

Sidebar

Related Questions

Consider the following where class Circle inherits from Shape: dim objListOfCircles as new List(of
Consider the following code: Dim arr1 As New List(Of Double) Dim arr2 As New
Consider the following code: Dim Working As Boolean = False Private Sub TreeView1_AfterCheck(ByVal sender
Consider the following code: Dim sql = SELECT * FROM MyTable WHERE value1 =
Consider the following example: Public Class ParentClass Public Sub GenerateReport Dim Col As Collection
Consider following: Partial View: <%= Html.ListBox(BlackList, Model.Select( x => new SelectListItem { Text =
Consider the following VB code: Dim fooBar As String fooBar = Foo Bar Dim
Lets consider following two codes First: for (int i=0;i<10000000;i++) { char* tab = new
Consider following code: typedef SomeType type_t[2]; SomeType * arr1 = new type_t; //new or
Consider following code: Dim S1 As String = a 'this is the string in

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.