RE: How to access an event of a custom control??? Thank you!

Discussion in 'ASP .Net' started by =?Utf-8?B?RGFuaWVsIFdhbHplbmJhY2g=?=, Apr 2, 2004.

  1. Hi Steven

    Thanks again for your help. It seems that my initial reply got lost in somewhere.
    The example you provided worked perfectly well. Unfortunately though (I probably should have told...) the control I have to design will hold a various number of buttons. Is my understanding correct that I need to create a Composite Control in order to be able to figure out which button was clicked? As far as I understood I won’t be able to distinguish the buttons by using a Rendered Control. Is this assumption right

    Thanks again
    Daniel
     
    =?Utf-8?B?RGFuaWVsIFdhbHplbmJhY2g=?=, Apr 2, 2004
    #1
    1. Advertising

  2. Hi Daniel,

    Yes, the example I provided in the former reply is just a very simple one.
    Since you mentioned that your control will contain many buttons and need to
    separate those button's click events. I think its better to make the
    control as a Composite control rather than render control. Since the
    compostite control is specially for those controls which has complex or
    hierarchical structures. You can make the whole control's control structure
    in the
    "CreateChildControl" function. Also, when making custom server control, be
    sure to make clear how the asp.net server control's event is fired at
    serverside, that'll help you to avoiding encountered many such problems.
    For more detailed infos, you may refer to the weblinks I provided in the
    last reply. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Apr 5, 2004
    #2
    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. Miguel Dias Moura
    Replies:
    1
    Views:
    421
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Apr 1, 2004
  2. Miguel Dias Moura
    Replies:
    1
    Views:
    437
    Lars Netzel
    Jun 18, 2004
  3. Miguel Dias Moura
    Replies:
    2
    Views:
    368
    Martin
    Jun 22, 2004
  4. shapper
    Replies:
    2
    Views:
    295
    Milosz Skalecki [MCAD]
    Jan 14, 2008
  5. Daniel Walzenbach

    Need help exdending custom control. THANK YOU!!!

    Daniel Walzenbach, Nov 5, 2003, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    144
    Daniel Walzenbach
    Nov 6, 2003
Loading...

Share This Page