SharePoint Config

Ari Bakker's thoughts on customising and configuring SharePoint

Archive for August, 2010

Creating custom parameters for a SPDataSource

with 3 comments

The SPDataSource is a great control for retrieving data in SharePoint. You can query a single list, multiple lists/libraries or webs and bind the data to any ASP.NET data bound control such as a Repeater, ListView, GridView or DropDownList as well as the DataFormWebPart if you want to control the output using XSLT.

You can also pass in parameters for your query such as the ListName or WebUrl using the parameter classes provided by ASP.NET such as the QueryStringParameter and ControlParameter class. As these are all generic ASP.NET controls, however, there is no way of using SharePoint specific information such as properties of the current page, or information from User Profiles. For example it isn’t possible to use this on a SharePoint publishing page and use a metadata… Continue reading Creating custom parameters for a SPDataSource »

Written by Ari Bakker

August 12th, 2010 at 8:55 pm