I am trying to extract two lists from an ascx control to save them to a PDF file:
<TagCloud:TagCloudControl ID="TagCloudControl1" runat="server" />
I get the following error: TagCloudControl1 is a field, but is used as a type, and an object reference is required for a non-static field, method or property ... Thanks for your help!
ListView lv1 = (TagCloudControl1)ListView.FindControl("ListView1");
ListView lv2 = (TagCloudControl1)ListView.FindControl("ListView2");
lv1.RenderControl(htWriter);
lv2.RenderControl(htWriter);
source
share