Composite ListBox Control

Discussion in 'ASP .Net Building Controls' started by Rory, Jul 29, 2003.

  1. Rory

    Rory Guest

    I don't know if I understand you correctly, but why would
    you want to change the name of your child controls?

    If you want to ensure that all of your childcontrols have
    unique naming and avoid naming conflicts, implement the
    INamingContainer in your class


    >-----Original Message-----
    >I am trying to build a composite webcontrol that

    essentially has two
    >listboxes next to each other with buttons to move items

    back and forth. The
    >way that I have done this is two create a custom control

    that inherits from
    >the ListBox and then I am adding buttons and another

    ListBox as child
    >controls. I've got the control displaying properly, but

    I'm having a problem
    >with the viewstate. The second listbox gives me the

    following error on a
    >PostBack:
    >
    >An error has occurred because a control with auto-

    generated id '_ctl101'
    >could not be located to raise a postback event. To avoid

    this error,
    >explicitly set the ID property of controls that raise

    postback events.
    >
    >In my control I am specifically changing the name of the

    child listbox. Do
    >I need to add some code for the viewstate of this child

    control.
    >
    >Thanks,
    >
    >Craig
    >
    >
    >.
    >
     
    Rory, Jul 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sleigh
    Replies:
    1
    Views:
    2,695
    sleigh
    Feb 12, 2004
  2. Replies:
    1
    Views:
    356
  3. Chad
    Replies:
    0
    Views:
    230
  4. Peter S.

    Composite dropdownlist control that also displays a listbox????

    Peter S., Nov 21, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    168
    Peter S.
    Nov 21, 2005
  5. studen771

    ListItemCollection for a listbox within a composite control

    studen771, Sep 15, 2006, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    183
    Chris Taylor
    Sep 17, 2006
Loading...

Share This Page