Link to home
Start Free TrialLog in
Avatar of MHenry
MHenry

asked on

How to dynamically change usercontrols? asp.net, c#, code-behind

I need to learn how to switch out usercontrols programatically.
I have two controls: ppLoggedOutMenu.ascx and ppLoggedInMenu.ascx.

I want to put the code in the page load method. I already have some code that is checking whether a cookie exists so I was hoping to just drop some code in to add the ppLoggedInMenu to the "(If cookie != "" )," portion of the code, but I can't seem to figure it out or find an example of how to do this.

Can anyone help?

Thanks,
MHenry
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MHenry
MHenry

ASKER

Hope you guys don't mind me splitting the points but I think both answers are great.