customized CreateUserWizard control is firing dropdown's OnSelectIndexChanged event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xMetalDetectorx
    New Member
    • Oct 2008
    • 44

    customized CreateUserWizard control is firing dropdown's OnSelectIndexChanged event

    I have a CreateUserWizar d control, for which I customized the first step.

    All I did was add 3 DropdownLists to represent Date of Birth fields. So I have Month, Day, and Year dropdowns.

    I have ViewState disabled at application level (disabled it in web.config).

    I enabled viewstate on Month, enabled AutoPostback = true, and have a method for the event OnSelectedIndex Changed.

    Depending on the Month, the values in Day can range from 28-31.

    Now when I fill out the form and hit Create User, the Month_OnSelecte dIndexChanged event gets fired first for some reason. I found this out by debugging. Because of this, it does not save the Day the user has picked.

    Anyone have an idea why it would be calling that event first? Thanks
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Are you setting the index of the Month DropDownList somewhere in your page load?

    Are you re-setting the data source or the items in the Month DropDownList in the page load?

    -Frinny

    Comment

    • xMetalDetectorx
      New Member
      • Oct 2008
      • 44

      #3
      @tlhintoq: sorry bout that, i just saw the asp.net board this morning. I posted in the regular .net first, and didnt see a way to move it to this board.

      @Frinavale: I only have this in my page load:
      Code:
      if (!Page.IsPostBack)
              {
                  FillYears(); //just fills the Year dropdown with a range of years.
              }

      Comment

      Working...