SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In SharePoint 2007, there are several relatively unknown DataSourceModes you can use with DVWPs (CrossList, ListOfLists, ListItem, and Webs - see I'm trying to use the Webs value in a DVWP in SharePoint 2010 and I can't seem to get it to work.

I've gone through exactly the same steps in SharePoint Designer in 2007 and 2010:

  • Add a DVWP to the page
  • Choose the Announcements list as the DataSource (just to get something up and running)
  • Display the ID column in a Multiple Item View
  • Switch the DataSouceMode to Webs (DataSourceMode="List" -> DataSourceMode="Webs")

This works in 2007, but gives me an error in 2010. Has anyone seen this work successfully in 2010?

share|improve this question
How does the markup compare between the 2007 and 2010 versions? – James Love Jan 30 '12 at 16:15
Also, what error? – James Love Jan 30 '12 at 16:17
The error occurs in SPD right after I switch the DatasourceMode to Webs, so there's no markup to look at; I don't get that far. The error is the ever-helpful: "The server returned a non-specific error when trying to get data from the data source. Check the format and content of your query and try again. If the problem persists, contact the server administrator." – Marc D Anderson Jan 30 '12 at 17:00
I stripped the DataSource down to just: <DataSources><SharePoint:SPDataSource runat="server" DataSourceMode="Webs" UseInternalName="true" UseServerDataFormat="true" id="dataformwebpart1"> </SharePoint:SPDataSource></DataSources> and still no joy. There's got to be something I'm missing. – Marc D Anderson Jan 30 '12 at 19:42
Did you already try with different SelectParameters inside SPDataSource? Tried Reflector? – Jussi Palo Jan 30 '12 at 21:42
up vote 1 down vote accepted

Mark - just spotted your question while I was drafting this blog post and searching for a solution to this problem. It seems there is a bug with the Webs mode in 2010 because the SPWeb no longer has a CustomizationMode property and the data source expects it....

share|improve this answer
Thanks for the info, Peter. Great work on the Metro DVWP, too! – Marc D Anderson Mar 23 '12 at 20:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.