WebUserControl and design time support

Discussion in 'ASP .Net' started by Christian H, Sep 30, 2005.

  1. Christian H

    Christian H Guest

    Hello,

    I've just created a WebUserControl that consists of a few other controls
    such as DropDownList, TextBox and Button.
    Based on the information entered in the DropDownlist, and TextBox, the
    Button.onClick event quries a database, and returns a DataTable.

    Because I'm going to use this control different places, and bind the
    DataTable in different ways (sometimes a datagrid, sometimes repeater) , I
    added a delegate (OnButtonSearchClick) that handles the Button.onClick
    event. The delagate also has a custom ButtonSearchEventArg to make things a
    little easier.
    This way I can add my WebUserControl to different Pages, hook up a
    ButtonSearchClick event to the control, and use the ButtonSearchEventArg to
    display my DataTable the way I want.

    Now, this all works just fine, but I'm having a bit trouble with Design
    support for my WebUserControl.
    How can I get my delegate to appear in the Properties->Events toolbox window
    ?

    Right now, I have to do it by hand , by writing
    myControl.ButtonSearchClick+=new ButtonSearchEventHandler(...)

    Is there any way of getting design time support for delegates, (and
    properties as well ), for a WebUserControl ?

    Thanks
    Christian H.
    Christian H, Sep 30, 2005
    #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. Arun

    WebUserControl and JavaScript

    Arun, Jul 13, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,784
  2. Michael Groeger
    Replies:
    2
    Views:
    1,980
    Michael Groeger
    May 9, 2005
  3. DagoFlores
    Replies:
    0
    Views:
    403
    DagoFlores
    May 19, 2005
  4. =?Utf-8?B?cm9kY2hhcg==?=

    databinding and webusercontrol

    =?Utf-8?B?cm9kY2hhcg==?=, Oct 25, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    306
    =?Utf-8?B?cm9kY2hhcg==?=
    Oct 25, 2006
  5. flamesrock
    Replies:
    8
    Views:
    453
    Hendrik van Rooyen
    Nov 24, 2006
Loading...

Share This Page