I am creating a composite custom control that inherits from WebControl.
I am overriding Controls like this:
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
I am then overriding CreateChildControls like this:
protected override void CreateChildControls()
{
Controls.Clear();
this.CssClass = "rating";
HtmlGenericControl header = new HtmlGenericControl("h2");
header.InnerText = MainTitle;
Controls.Add(header);
base.SpacerControlAdd();
CurrentRatingRender();
HtmlGenericControl hrDiv = new HtmlGenericControl("div");
hrDiv.Attributes.Add("class", "hr");
hrDiv.Controls.Add(new LiteralControl("<hr/>"));
Controls.Add(hrDiv);
SpacerControlAdd();
UserRatingImagesRender();
}
The last method UserRatingImagesRender, renders a number of ImageButtons.
I am adding command values to the buttons like this:
result.CommandName = "rate";
result.CommandArgument = rating.ToString();
I want to intercept these ImageButtonās click events so I thought I would
override OnBubbleEvent but the problem is that the event is not firing whenever
I click one of the buttons.Does anyone know what is wrong or how I can
intercept the click events?
Cheers
[EMAIL PROTECTED]
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces.
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com