W
Wee Bubba
my user control (usercontrol1.ascx) is added dynamically into a
placeholder on page_load. within usercontrol1.ascx there is a button.
When a user presses this button I want the page to reload with a
different user control (usercontrol2.ascx)
if i add the button to the main page I can do this within the button
event handler:
myPlaceHolder.Controls.RemoveAt(0);
myPlaceHolder.Controls.Add(LoadControl("usercontrol2.ascx"));
but if I put this code inside the button event handler in my
usercontrol1.ascx it doesnt work. how do i communicate my event
handler code from my user control to the parent page placeholder
please?
thanks
placeholder on page_load. within usercontrol1.ascx there is a button.
When a user presses this button I want the page to reload with a
different user control (usercontrol2.ascx)
if i add the button to the main page I can do this within the button
event handler:
myPlaceHolder.Controls.RemoveAt(0);
myPlaceHolder.Controls.Add(LoadControl("usercontrol2.ascx"));
but if I put this code inside the button event handler in my
usercontrol1.ascx it doesnt work. how do i communicate my event
handler code from my user control to the parent page placeholder
please?
thanks