.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Viewing the content of a specific folder from a library in a webpart

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint

Hello all!

I was wondering if anyone knew how to view the content of a specific folder from a library in a webpart?


View Complete Post

More Related Resource Links

View content of a specific folder in customized view


I would like to create a customized view (edit current view] that only shows the content of one specific sub folder of a document library. So far I have used meta data to show only specific content in a view, but I am wondering whether there is any easier solution, such as "filename" begins with ../../.../foldername

Adding New Custom Folder Content Type doesn't show up on the Document Library New Menu


I been trying to add new custom folder content type to the document library programatically in my sandbox environment and it does show up on the document library. But, when I move same code to the almost similar configured SP2010 environment, adding new folder content type to the document library doesn't show up on the document library's new menu.

Here is the code? Since this code works fine in my sandbox environment, is there any other settings I should check on the server environment which would cause hiding content type on new menu of document library.

  class Program
    static void Main(string[] args)
      SPSite spSite = new SPSite("http://sp2010vm");
      foreach (SPWeb spWeb in spSite.AllWebs)
        spWeb.AllowUnsafeUpdates = true;

        //For each site, cycle through lists
        bool isDocLibraryExists = false;
	      foreach(SPList spList in spWeb.Lists)
          if(spList.Title == "Classified Documents")
             isDocLibraryExists = true; 
        if(isDocLibraryExists == true)
          //Create new doc library
          SPList splist = spWeb.Lists["Classified Documents"];

          //Create Content Type
          SPContentType documentContentType = spWeb.AvailableContentTypes["Classified Documents Folder"

Debugging Tool: Build a Logging and Event Viewing Library to Help Debug Your .NET Framework-based Ap


Building a basic, reusable application framework can make development quicker and easier. This allows you to focus more on the problems at hand and less on the repetitive tasks involved in building any application. In this article, the author presents a framework that provides facilities to access the registry and an extensible framework for logging messages to a console window or the Event Viewer. This reusable framework can be included as a library in your projects, allowing you to display an enhanced, color-coded message log and dynamically change logging levels.

Daryn Kiely

MSDN Magazine May 2003

When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open


When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open.

I am using IE7 and the path of the folder does not contains more than 100 characters.

Also it opening on few on the machines which has IE7.


Programmatically delete a .webpart file from wpcatalogs folder from an IIS website


We are using a third party wsp in our solution which directly adds the web parts into the web application store rather than the web part gallery(References to them are present in IIS site's wpcatalog directory). We want to remove these web part files so that the users will not be able to add these web parts to pages directly. Or any other modification so that users will not be able to add these directly. Is there a way we can do this programmatically?

Can i Map to external link from document library folder



Is There any one know how to link document library folder is to external site 



Copy the content of one form library to another form library



I have created a form library named "A" where I store all the info-path forms submitted by a certain group of people. In that form library I created a column "status". When the form is submitted the value of status will be "0". Once a person approves this form I am changing the status value to "1". If the value is changed to "1", that form should be copied or transferred to another form library named "B".

How can I implement this logic ? Any help...

When i click on any other folder in the document library that will navigate to default view of DL?



I have document library with having some folder in the same ,i have displayed my library in the page as Treeview, so when i click on any of the folder in the library i need to navigate allitems.aspx page i.e default view page of the document library ,the document library having views.Suppose when i am in other view i have selected folder from library treeview folder is changing but view not navigate to default view.

pls help 


Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.

list webpart, not using the sourse url, but referring back to the library view on close.

i have a webpart which brings a list in to my front page. -when user clicks, it shows  the item, and when he clicks on close,it takes him back to the library view. not back to the page,from where the request has initiated. we are using f5 load balancer, and our webapplications are extended. is there somesetup i am missing, so that i can make the sourse url's refer back to the originating page.        

Show folder content in a ListBox

Hi. I am close to going crazy here :) I have a small app and I want people to be able to open some files from within it. All I want is a small control that shows me the content of a specific folder on the HDD. My current approach includes a ListBox which should be filled with the documents of that folder. However I have (even after hours of googling and binging^^) absolutely no idea how to get them in there. I hoped that you could databind your ListBox to the file system, but this does not seem to be possible. Do I have to fill it via c# code? If so, how?   Any help would be greatly appreciated.  

Create buttons for "new item" which create a new page of a specific content type

We have a Pages library (wiki) which supports a few content types (and page layout associated). We want to enable users to click a button for example of "new custom enterprise wiki page" - so a new page of content type article will be open in edit mode. Can someone help how to develop? (it has to mimic the behavior that happens when user creates new page from the Ribbon or Site actions and has to choose the content type, it also has to keep the new page in edit mode and not just create it).  

Problem with Content Query Webpart and Custom Userfields

Dear Community, I am using Sharepoint 2007's content query webpart to access content types from 2 lists each contained in a different sitecollection. To achieve this, I used this tutorial: http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx. The tutorial worked great. By using the property CommonViewFields and modifing the XML Stylesheets accordingly, i could access almost every field. Even User Fieldtypes like editor and author were accessible by adding (editor,User) or (author,User) to the CommonViewFields property. But when I tried to access the custom made userfield "Username" in the same way (adding Username,User to the property), the webpart threw an error and couldn't be displayed anymore. When I changed it to Username,Text , no error occured but it naturally didn't show up, since it is the wrong fieldtype. I hope some of you can help me, since all my researches on this topic only brought up some more people with the same problem, but no solution to it. Thanks in advance, SoundofSilence

Provisioning did not succeed. Details: Failed to create the 'Reusable Content' library. OriginalEx

Hi there, I am trying to activate the Feature SharePoint Server Publishing Infrastructure in a Team Site, but I am getting the following message: Provisioning did not succeed. Details: Failed to create the 'Reusable Content' library. OriginalException: Column 'ShowInRibbon' does not exist. It may have been deleted by another user. This environment is running SharePoint 2010 Server, as a result of an upgrade of MOSS 2007 by moving the Content Database. The visual upgrade was applied partially in this Site Collection, not for all the Web Sites. Interestingly for new SharePoint 2010 Site Collections the activation works fine! But not for this specific Site Collection. Any clues? Cheers,Marcel Medina - SharePoint Developer Blog: http://sharepoint4developers.spaces.live.com Blog: http://sharepoint4developersnz.spaces.live.com Blog: http://www.canalsharepoint.com.br/marcelmedina

Content Query Web Part (CQWP) fails to show picture items from a document/picture library in an anon

I have a Picture Library and am trying to use the CQWP to display a list of items in the library.  The web part shows the items fine in authenticated mode, but it fails to show the items to anonymous users. The error log message is: Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.SetDocumentIconUrlAndOnClickString(SPWeb web, DataRow row, String strDefaultItemOpen, Boolean fSetDocIcon, Boolean fSetOnClick, String fileRefColumnRef, String progIdColumnRef, String fsobjTypeColumnRef, String permMaskColumnRef)     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.PreProcessForDocumentIconAndOnClickAttribute()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.AddContentQueryData()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String viewPath)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform) I'm running SP 2010.  I've tried various scenarios including: 1. Using the default publishing template. 2. Using the blank site template with publishing and lock down features enabled. 3. Us

How to submit my form to Sharepoint Library as well as Sharepoint List with specific Fields only.

Hello ,   I have a Infopath form that contain 50 of fields. i want to submit those form into sharepoint library as well as Sharepoint Custom List(Specific Fields). Please suggest best practice to develop such a functionality.   Thank you.

how to get ListItems in Specific folder and not in subfolder ?

Hi,  following query gives me the items in subfolder also, but i need items in specific folder only.   not in subfolder.   what needs to be modified?     string folderQuery = " <Contains><FieldRef Name=\"FileRef\" /><Value Type=\"Text\">" + folderName + "</Value></Contains>";                SPQuery query = new SPQuery();                               query.Query = "<Where><And>"+folderQuery+" <Eq><FieldRef Name='FSObjType'/><Value Type='Lookup'>0</Value></Eq><And></Where>";                                                                           query.RowLimit = 500;             &nbs
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend