Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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"
    DataSourceMode="List"
    UseInternalName="true"
    SelectCommand="<Query><OrderBy><FieldRef Name='Title'/></OrderBy></Query>">
    <SelectParameters>
        <asp:Parameter Name="WebUrl" DefaultValue="/News/" />
        <asp:Parameter Name="ListName" DefaultValue="Companies" />
    </SelectParameters>
</SharePoint:SPDataSource>
<asp:DropDownList ID="ddlCompany" runat="server"
    DataSourceId="sdsCompany"
    DataTextField="Title"
    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! –  Moray Apr 26 '12 at 9:41

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.