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


Top 5 Contributors of the Month
david stephan

Home >> Forum >> SharePoint >> Post New QuestionBookmark and Share Subscribe to Forum

sharepoint document library folder as webpart

Posted By: pooja     Posted Date: April 05, 2010    Points:2   Category :SharePoint
hi frnds...



i have a document library in my sharepoint site... i have 4 folders in that document library which has DOC files.... i want to make a webpart which displays the files in particular folder....



plase gulde me





thanx in advance

Responses
Author: Venkat             
Posted Date: April 08, 2010     Points: 5   

Hi,

This article might be helpful to you..

http://sharemypoint.wordpress.com/2008/04/23/select-a-view-for-document-library-web-part/

Mark As Answer if this solve your problem
Warm Regards,
Venkat
Author: Sunil Yadav       [Moderator]      
Posted Date: May 27, 2010     Points: 5   

Hi,

To achive this you need to create custom webpart which will iterate all the data from the document library and from specific folder based on parameter passed to it.
You can refer following to get an idea.
 public class GetFolderData : WebPart
{
private string folderName = "Folder Name";
[WebBrowsable(true), Personalizable(true)]
public string FolderName
{
get { return folderName; }
set { folderName = value; }
}
protected override void Render(HtmlTextWriter writer)
{
writer.Write(folderName);
}
}


Author: bijayani             
Posted Date: June 08, 2010     Points: 5   

Hi,

I am sharing a tips. The tips is about "Programatically adding a document to document library in SharePoint".

In some cases we need to add documents to the doument library programatically, the code snippet below demonstrates how to add a document to the document library .


using (SPSite objSite = new SPSite("urlAddress"))
{
objSite.AllowUnsafeUpdates = true;

using (SPWeb oSPWeb = objSite.OpenWeb())
{

Hope you find this tips useful and of assistance. For more detail on this tips, please visit: http://www.mindfiresolutions.com/Programatically-adding-a-document-to-document-library-in-SharePoint-709.php

Thanks,
Bijayani

Author: bijayani             
Posted Date: June 22, 2010     Points: 5   

In some cases we need to add documents to the doument library programatically, the code snippet below demonstrates how to add a document to the document library .



using (SPSite objSite = new SPSite("urlAddress"))
{
objSite.AllowUnsafeUpdates = true;

using (SPWeb oSPWeb = objSite.OpenWeb())
{
oSPWeb.AllowUnsafeUpdates = true;

//Test1 is the document library

SPList docLibrary = oSPWeb.Lists["Test1"];

using (FileStream fs = File.OpenRead(FullPath))
{

Hope you find this tips useful and of assistance.

Thanks,
Bijayani
http://www.mindfiresolutions.com/Sharepoint-Consulting-Company.htm

Author: elizas             
Posted Date: June 28, 2010     Points: 5   

In some cases we need to add documents to the doument library programatically, the code snippet below demonstrates how to add a document to the document library .



using (SPSite objSite = new SPSite("urlAddress"))
{
objSite.AllowUnsafeUpdates = true;

using (SPWeb oSPWeb = objSite.OpenWeb())
{
oSPWeb.AllowUnsafeUpdates = true;

//Test1 is the document library

SPList docLibrary = oSPWeb.Lists["Test1"];

using (FileStream fs = File.OpenRead(FullPath))
{
http://www.mindfiresolutions.com/Sharepoint-Consulting-Company.htm



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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