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 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
add comment

2 Answers

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
add comment

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 http://office.microsoft.com/en-us/sharepoint-server-help/work-with-filter-web-parts-HA010033786.aspx#BM2

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
add comment

Your Answer

 
discard

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.