This is a migrated thread and some comments may be shown as answers.

Rendering Tree View

0 Answers 75 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 11 Feb 2009, 09:36 PM
I have a RadTreeView that I would like to render the html for so that I can put it in an email.  When I try to call the tree's RenderControl Method I get an error:

Script control 'TOCTree' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl

Here is the code.

 

protected void btnEmail_Click(object sender, EventArgs e)

 

{

 

    StringBuilder sb = new StringBuilder();

 

 

    StringWriter sw = new StringWriter(sb);

 

 

    HtmlTextWriter tw = new HtmlTextWriter(sw);

 

 

 

    

 

    //render the table of contents tree
    TOCTree.RenderControl(tw); //error on this line

 

}

I've tried a lot of things but I can't seem to get rid of this error.  Please help.

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Ken
Top achievements
Rank 1
Share this question
or