Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to set the DataSource & ContentType of a ContentQueryWebpart programmatically?

$
0
0

I created a ContentQueryWebpart in VisualStudio and used properties that I exported from a configured one on a SharePoint site. It works fine so far, but now I want to programmatically change the datasource and contenttype it is getting it's data from.

What I want to achieve is: the webpart should get the current siteURL or webURL it is placed in and get all all tasks of a tasklist in that web and all tasklists of it's subwebs for example.

How do I set those two properties in code? 


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>