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?

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.