How to render AjaxToolkit controls
<p>I am trying to get the rendered HTML of Ajaxtoolkit:Editor control. I am getting an error while rendering here is my code:</p>

<pre><code>[WebMethod]
        public static string GetHtmlEditor()
        {
            CustomHTMLEditor objCustom = new CustomHTMLEditor();
            StringBuilder sb = new StringBuilder();
            StringWriter sw = new StringWriter(sb);
            HtmlTextWriter textWriter = new HtmlTextWriter(sw);
            UpdatePanel up = new UpdatePanel();
            up.ID = "upId";
            up.ContentTemplateContainer.Controls.Add(objCustom);
            up.RenderControl(textWriter);
            return textWriter.ToString();
        }
</code></pre>

<p>Error: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.</p>

<p>I tried executing directly i.e without using UpdatePanel. Still it throws the same error.
Can i render Ajaxtoolkit controls?</p>
