dimaash 0 Newbie Poster

Hi everyone,
I have a certain page let's call it main.aspx which hosts multiple usercontrols.
One of these usercontrols (Say UC1.ascx) contains another usercontrol
(say UC2.ascx). Now the UC2 is a self contained control which
does everything by itself. The only thing it needs is some peice
of data ( a string ) from its parent control UC1.

On the UC1.ascx page the UC2 is included declaratively(it was not added dynamically), and also the UC2 is initially hidden in the panel which is being modally poped up depending on user interaction with UC1.
So the big picture:
UC2.ascx -> UC1.ascx -> Main.aspx (UC2 is inside UC1, which inturn is on Main page)
or if you will
Main.aspx -> UC1.ascx -> UC2.ascx

My question is, how can i pass the string to UC2 from UC1???

I have read a lot of posts and howtos. I've tried public property of UC2 which is being set on a button_click from UC1. But for some reason, the property doesn't stick. It is just getting nulled all the time once UC2 loads and renders.

I've tried event delegates and event handlers, but that also didn't work for me. The events were never caught.

I have tried event bubbling, but for some reason the OnBubbleEvent inside UC2 was only catching the event once the UC2 was being closed.

Can some1 help please???
Appriciate all the help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.