Vb.net – Asp.NET dropdownlist in usercontrol not firing SelectedIndexChanged event

asp.netdrop-down-menuselectedindexchangeduser-controlsvb.net

Asp.Net 2.0 framewrok – VB.Net application
I have a UserControl containing a Asp.Net DropDownList.

Things already researched and \ or tried:

  • The control gets bound to data on page load inside if not Page.IsPostBack (only loads once)
  • ID proprety is set for control (ID = ddlMyControl)
  • AutoPostBack is set to true
  • EnableViewState on the control is set to true
  • AutoEventWireUp in the UserControl declaration is set to true
  • EnableEventValidation is set to false in the parent page

The control will not fire it's SelectedIndexChanged event no matter what I do. HELP !!

Thanks 🙂

Best Solution

I was running into a similar issue and it was because I left AutoPostBack="true" out of the control definition. In your original post, you said you had tried that but the posted code:

<uc3:TheControl ID="ucMyControl" runat="server" />

does not reflect the AutoPostBack property. I added that to mine and it took care of my problem. Hope that helps.

Related Question