SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

I've put an SharePoint:SPDataSource element on an aspx page, which is going to be linked to an asp:DropDownList, but I can't find a value for the query WebUrl parameter that works. What am I missing? The markup looks like this:

<SharePoint:SPDataSource ID="sdsCompany" runat="server"
    SelectCommand="<Query><OrderBy><FieldRef Name='Title'/></OrderBy></Query>">
        <asp:Parameter Name="WebUrl" DefaultValue="/News/" />
        <asp:Parameter Name="ListName" DefaultValue="Companies" />
<asp:DropDownList ID="ddlCompany" runat="server"
    style="min-width:200px" AutoPostBack="false" />

The list I'm trying to reference is at http://server/sites/News/Lists/StandingData/Companies/, but nothing I've tried so far works. Any suggestions?

share|improve this question
I think that the WebUrl should be /sites/News/. – Alexander Apr 26 '12 at 8:53
Thanks! I got rid of the StandingData subdir too, and it all works! – Mourndark Apr 26 '12 at 9:41

Your Answer


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

Browse other questions tagged or ask your own question.