IPostBackDataHandler methods never gets called

Last post 07-03-2009 12:30 PM by RichardD. 1 replies.

Sort Posts:

  • IPostBackDataHandler methods never gets called

    07-01-2009, 2:28 AM
    • Member
      79 point Member
    • bhav27
    • Member since 06-07-2006, 4:10 PM
    • Posts 96

    I have server control inheriting from WebControl and implementing IPostBackDataHandler

    In the CreateChildControls() I add several controls of type ListControl to the controls collection. I need to collect the state of those controls during post back in my business objects which are public properties of this server control. I am trying to collect state in the LoadPostData(), but for some reason I never call this method called.

    What could be the reason for this method not being called?

  • Re: IPostBackDataHandler methods never gets called

    07-03-2009, 12:30 PM
    Answer
    • Contributor
      2,766 point Contributor
    • RichardD
    • Member since 09-03-2002, 7:43 AM
    • Sussex, UK
    • Posts 364

    LoadPostData is only called if the posted form contains a field with a name which matches the UniqueID of your control.

Page 1 of 1 (2 items)