Awesome idea! Here's basically what I'm doing:
// Code for Adding the User Control
PlaceHolder1.Controls.Add(LoadControl("taclient.as cx"));
// Code for Removing the UserControl
Control myControl = PlaceHolder1.Controls[0];
PlaceHolder1.Controls.Remove(myControl);
Thanks again,
- TJ
"Walter Wang [MSFT]" <> wrote in message
news:...
> Hi,
>
> Thank you for your post.
>
> Based on my understanding, your question is how to conditionally
> load/render a UserControl. If I've misunderstood anything, please feel
> free
> to post here.
>
> I think you can dynamically load the UserControl into the WebForm rather
> than declaratively use it. You can replace the UserControl with a
> PlaceHolder on the WebForm, and use LoadControl() to load the UserControl
> and add it to the PlaceHolder.
>
> Hope this helps. Please feel free to post here if anything is unclear.
>
> Regards,
> Walter Wang (, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
|