I'm not familiar with WebUserControlComponentActivator, but here is the
code:

public static string RenderView(string path)
    {
        Page pageHolder = new Page();
        UserControl viewControl = (UserControl)
pageHolder.LoadControl(path);

        pageHolder.Controls.Add(viewControl);

        StringWriter output = new StringWriter();
        HttpContext.Current.Server.Execute(pageHolder, output, false);

        return output.ToString();
    }

P.S. code taken from
http://weblogs.asp.net/scottgu/archive/2006/10/22/Tip_2F00_Trick_3A00_-Cool-UI-Templating-Technique-to-use-with-ASP.NET-AJAX-for-non_2D00_UpdatePanel-scenarios.aspx
On Thu, Sep 11, 2008 at 6:21 PM, Wayne Douglas <[EMAIL PROTECTED]>wrote:

>
> Victor Kornov wrote:
> > Just make a fake page that will host your control.
>
> by newing up a a page and a form object  manually? If this works would
> it not be a good idea to have it in the WebUserControlComponentActivator
> class after
>
> [...]
> if (currentPage == null){
> [...]
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to