Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.aspnet.webcontrols
EventBubbling problem - OnBubbleEvent is not getting Called
Prince Matthew Koshy
1/3/2003 7:48:00 AM
Hi folks,
Please help me
I have got a problem with my web custom control. Actually it is a
composite control. It is having 3 HyperLink controls as child controls.
I am adding these Hyperlink controls using Controls.Add() in the
overridden CreateChildControls() method. I am attaching an Attribute
"onclick" for each Hyperlink control. When I click the the HyperLink
control I am passing the id of the Parent control and the id of the
HyperlinkControl to the doPostBack function.
protected override void CreateChildControls()
{
a loop of count 3
{
HyperLink hlink = new HyperLink();
hlink.ID=actions[i]; //<-- name or id will be
dynamically fetch from an array
hlink.ImageUrl=xnode.Attributes["image"].Value;//image
taken from xml file
hlink.Attributes.Add("onclick",Page.GetPostBackEventReference(this,
actions[i]));
Controls.Add(hlink);
}
}
I am also implementing the public void
RaisePostBackEvent(String eventArgument)
protected override bool OnBubbleEvent(object source, EventArgs
args)
The problem is the code inside the RaisePostBackEvent is calling
smoothly on postback. But OnBubbleEvent is not getting called by the
runtime on postback. Is there any problem? What could be the possible
problems? Do I need to take care of some special thing? Please help me
Regards
Prince matthew
*** Sent via Developersdex
http://www.develop...
***
Don't just participate in USENET...get rewarded for it!
1 Answer
msnews.microsoft.com
1/10/2003 10:35:00 PM
0
OnBubbleEvent() will be called when a child control bubbles up an event. Is
this scenario valid in your case?
Nandakumar
http://crookedtrunk.com...
"Prince Matthew" <pkoshy@netassetmgmt.com> wrote in message
news:OThSRQvsCHA.1676@TK2MSFTNGP10...
>
>
> Hi folks,
> Please help me
> I have got a problem with my web custom control. Actually it is a
> composite control. It is having 3 HyperLink controls as child controls.
> I am adding these Hyperlink controls using Controls.Add() in the
> overridden CreateChildControls() method. I am attaching an Attribute
> "onclick" for each Hyperlink control. When I click the the HyperLink
> control I am passing the id of the Parent control and the id of the
> HyperlinkControl to the doPostBack function.
>
>
> protected override void CreateChildControls()
> {
> a loop of count 3
> {
> HyperLink hlink = new HyperLink();
> hlink.ID=actions[i]; //<-- name or id will be
> dynamically fetch from an array
> hlink.ImageUrl=xnode.Attributes["image"].Value;//image
> taken from xml file
> hlink.Attributes.Add("onclick",Page.GetPostBackEventReference(this,
> actions[i]));
> Controls.Add(hlink);
> }
> }
> I am also implementing the public void
> RaisePostBackEvent(String eventArgument)
>
> protected override bool OnBubbleEvent(object source, EventArgs
> args)
>
> The problem is the code inside the RaisePostBackEvent is calling
> smoothly on postback. But OnBubbleEvent is not getting called by the
> runtime on postback. Is there any problem? What could be the possible
> problems? Do I need to take care of some special thing? Please help me
>
> Regards
> Prince matthew
>
>
> *** Sent via Developersdex
http://www.develop...
***
> Don't just participate in USENET...get rewarded for it!
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
EventBubbling problem - OnBubbleEvent is not getting Called
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password