dynamic events on dynamic controls

Discussion in 'ASP .Net Web Controls' started by dje, Jun 25, 2004.

  1. dje

    dje Guest

    I'm creating my first custom control; it has a table with a variable
    number of cells (user defined at design time). Each cell has a button.
    Is it possible to attach events to these buttons? If so, how?
    dje, Jun 25, 2004
    #1
    1. Advertising

  2. dje

    Guest

    On 25 Jun 2004 09:55:47 -0700, (dje) wrote:

    >I'm creating my first custom control; it has a table with a variable
    >number of cells (user defined at design time). Each cell has a button.
    >Is it possible to attach events to these buttons? If so, how?


    You will have to probably recreate the whole table with all the cells
    / buttons / event handlers each time the page comes back. this is not
    a definate answer tho.

    -Adam
    , Jun 25, 2004
    #2
    1. Advertising

  3. Yes. You have to recreate the whole control again. You probably do that n
    CreateChildControls overridden method. You have to do this in some way:
    - recreate all controls
    - restore from some persisting storage (Cache, Session etc). Somewhere where
    you can store whole objects

    When you recreate those you always have to connect to event handlers the
    normal way.

    Would you like to have a default event handler or would you like to define
    the handler on the page, that uses this control. You'd have to do some more
    coding if the second one is the case.

    --
    RobertK
    { Clever? No just smart. }

    "dje" <> wrote in message
    news:...
    > I'm creating my first custom control; it has a table with a variable
    > number of cells (user defined at design time). Each cell has a button.
    > Is it possible to attach events to these buttons? If so, how?
    Robert Koritnik, Jun 28, 2004
    #3
    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. Replies:
    5
    Views:
    5,581
  2. =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=

    order of events - dynamic checkbox events

    =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=, Aug 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    563
    =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=
    Aug 17, 2005
  3. newbye
    Replies:
    0
    Views:
    580
    newbye
    Jul 6, 2006
  4. SevDer
    Replies:
    2
    Views:
    1,300
    Walter Wang [MSFT]
    Nov 13, 2007
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    358
    Chris
    Aug 30, 2005
Loading...

Share This Page