C
Christian H
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.
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.