I am starting a SharePoint application where I need to filter a document library dynamically when a user visits a page.

Is this possible? If yes, how? Is it possible to have an application page with a document library on it?

i.e. a user visits an application page which has a document library on it. As the user opens the page i want to filter the documents in the library based on some user contextual information (say department) where department is a column of the meta data

(another scenario, on the application page i have a dropdownlist, after the user makes a selection i want to show specific documents based on the user selection

2 Answers 2


If it is simple functionality, could you use the inbuilt filter web parts:


  • Current User Filter (and select Department)
  • Choice Filter (for the drop down)
  • Is there a way to do this through code? (after page loads?)
    – David
    Apr 14, 2011 at 21:59

You can use a connection from another webpart. Have one webpart where the user selects a department and then have that value linked to the library web part so it can filter the view.

  • How could I create a webpart that is abble to be linked to the library webpart?
    – pepersview
    Mar 2, 2012 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.