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

I need to create a sharepoint page that will show the data from diferrent SharePoint list in a single view based on user selection. If the user want to view info about Employee the Page will display data from employee List. If they want to view the Students info it will show data from Students List.

I want to have one list webpart(XSLT List View webpart???) and change the content based on user selection. The List to use will be passed to this page via a Query String...

Any Suggestions?

share|improve this question
up vote 1 down vote accepted

You could use the SPDataSource Control in combination with the BaseXsltListWebPart the achieve this.

Try the following:

  • Create a Control which includes the SPDataSource control. You can find a description how to use the SPDataSource control in Chris O'Brien's Blog. In the second post you can find a description how to use the Query String as parameter
  • Create a WebPart which inherit from the BaseXsltListWebPart
  • In the OnInit add your DataSource control to the Controls collection of the WebPart and assign it the a field
  • Overwrite the GetDataSource method and return your control
  • Set your XSL with the Xsl or the XslLink property
share|improve this answer

The simplest way is by using the Filter web parts (require SharePoint standard license at least). These web parts come in many "shapes", see here examples and details how it can be used

These web parts are Connectable web parts which actually consume/provide data to each other and one could achieve this via the web UI.

Hope it helps, C:\Marius

share|improve this answer

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.