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

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

Programmatically Uploading a Documents into a Document Library using web part ?

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :SharePoint
Hii, Can anyone can help me how to upload the documents to the document library in sharepoint foundation using customization for what our deafult upload.aspx will do !!!!! Thanks in advance !!!! Rgrds//Praveen  

View Complete Post

More Related Resource Links

Error while downloading and uploading Documents from document library



We have a set of documents in a document library, which we are trying to download. if i click on the document and try to download, it takes a lot of time and then reports a error message.

Exception from HRESULT: 0x80041050

Now when we also try to upload documents, it does not allow us to upload the documents and reports a exception.

We tried to research through through the error, it gaves us while downloading the document, it is somewhat related to the Antivirus issues and looks like a document that is infected. This is only related to some documents and not all documents.


Let us know if there is any where to work around this issue and allow users to upload and download documents or how to tackle the antivirus issue.


It looks like the SharePoint antivirus has flagged off some of the so-called infected documents with some non-zero values, the resolution to this as suggested by microsoft is to re-run the anti-virus, so that the document value can be set to zero again and have the file downloaded.

Your help will be highly appreciated in this regards.







How do I resolve that the documents w/in the document library are not visible via the web part but u


The documents w/in the document library that have been exposed via the document library web part is not visible to our users in Germany but the web part heading and 'Add a new document' link is visible to them; all are visible to other users in same permissions group. The users in Germany can execute the shortcut links to the documents within this library and can upload a document to the library but just cannot see the list of the documents within the library via the document library web part; what baffles is that they can see a sub-set of the documents via the List View webpart on the same landing page. We have checked for their membership inclusion within the site and document library permissions and there is no unique permissions at the document level, and there is no unique filters with the document library web part. Where else do we need to look or do to resolve? Thank you in advance for your help.

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

HTTP 400 Bad Request Error when uploading to document library


I am running MOSS 3007 Standard on Windows 2003. When trying to upload files larger than about 29Mb, I am getting an HTTP 400 Bad request error. The error states "HTTP Error 400 - Request is badly formed." I am able to successfully upload a 28Mb file. Sharepoint is configured to accept files up to 75Mb.

I have done a fair amount of research on this, but none of the solutions seem to apply to our environment. The two most likely candidates do not apply, for example we are NOT running URLScan (there are a variety of solutions suggesting this could be an issue with uploads of 30Mb or more), and we are on 2003 with IIS6, so again the issue relating to 2008 and IIS7 do not apply.

The "Request is badly formed" part of the request is particularly confusing as most issues I have come across where this error is the symptom point to errors in custom code that is trying to talk to SharePoint. We have done none of our own custom coding and this error is occurring when attempting a simple upload to a document library.

Trying to drag and drop the file across when the document library is open in windows explorer also fails.

I did come across someone saying they had a similar problem which was caused by a damaged content database, however in this case, it is occuring regardless of which content database I use, so either they are all corrupt

Document viewer on a documents Library & Tooltip Bubble on rollover

Hi everybody,
1 - I would like to know, if in Sharepoint 2007 ECM part (Documents Library), there's a downloadable webpart or an application to create a document viewer (pdf, doc, xls, msg...) in an iframe when you point the mousse over a document or something like that...
If it doesn't exist do you have in mind a code sample which can make something like that ? thank you.

2 - It's possible in a documents library to activate balloon tooltips which show us metas of the document (on mousse over), like an option or an application...

Thank you very much.
All the best.
Go I.T.

Upload documents to Sharepoint 2010 Document library

Is there a way to upload documents to an SP 2010 document library with Custom Actions or Workflows?  I have a requirement of taking the contents of several directories (older data files) and uploading them to Sharepoint.  Not sure which actions actually perform this operation.  Any help most greatly appreciated.

Uploading a file to a document library produces access denied error, but only on first try.

Hi I have a task which uses a custom form which is part of a custom workflow.  The form incorporates an asp fileUpload control to allow a user to browse for a local file which they can then select and it will be upload a file to a folder in a document library.  The first time this action is performed the folder in the document library will not exist so the code creates a folder and then uploads the file to it. The problem I have is, the first time users try and upload a file the directory is created in the document library as expected, but then the user gets redirected to the standard SharePoint Access Denied page.  If the user goes back to the task list, then loads the task web page again, selects the same file and hits upload, then the file is uploaded fine. All subsequent file uploads work fine after that for all users. Users have Contribute permissions on the document library. The code to do the upload is as follows.  The task has a "CR Number" associated with it, which the directory in the doc library should be called.  It uploads the file to a stream.  Then gets the url of the web and works out the file url and uploads it.  The creation and checking of the folder in the doc library happens in the getDirUrl method. /// <summary> /// Processes an uploaded file. /// </summary> /// <param name="

Converting Word Documents library to PDF document library in SharePoint Server 2007

My project requires me to create an event reciever such that when a word file is added to one library the same content pdf file should be added to other library also when a word file is updated,edited or checked in the respective pdf file in other document library should be replaced by a new pdf file with the edited word content . Can we do this in Sharepoint 2007 I have seen this can be done in Sharepoint 2010 http://msdn.microsoft.com/en-us/library/ff181518.aspx

Opening office Documents in MOSS 2007 document Library.... You get a prompt to login...

*Sigh* i know i'm not the only one who has experienced this.   You have a Moss 2007 farm on your Server... yet you have employees and users who use Office 2003 products (word, excel, power point) Everything is installed correctly you yourself use office 2007. but don't post office 2007 docs.. just open the docs that people already post (2003 stuff) Computer Environment si am using....It does this in both Environments1st one Windows Vista Ultimate Updated Service Packs Office 2007 All update Serice Packs Internet explorer 7.0 2nd Environment Windows XP all updated Service Packs Office 2007 All updated Service Packs Windows Internet Explorer 7.0 Server Environment Moss 2007 with SP1 installed Microsoft 2003 Server No matter what happens.... when i try to open up a word documents or excel or anything.. when using office 2007..... it ask me for a login...I believe there was an article about correcting something in the registry or something.. can someone give me detail bulleted / bold instructions... this has been bothering me for a while.

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

Clicking on "Shared Documents" gives link to download instead of opening document library

Hi, I hope someone can help! All of a sudden (I don't know if someone has changed something!), whenever anone clicks on a link to open the "shared documents" document library in a specific site within our sharepoint site, instead of opening the document library, it instead gives a download dialog for a zip "AllItems.aspx" as a zip file. Anyone got any iteas what could have gone wrong and how to correct the issue?   Many thanks for any help!

How to search documents from the particular document library using FullTextSqlQuery in sharepoint?

Hi, I want search (wildcard search) the document from the particular document library using FullTextSqlQuery class. Thanks Srikanth Reddy

SharePoint Programming: Replace content in documents of Document Library

HI, I have 100+ word documents in one of the document libraries on our SharePoint portal. Most of these documents contain HYPERLINKS which refer to a totally different SharePoint server. My task is to update all these HYPERLINKS to point to our server instead of external server. Any pointers on how to accomplish this would be highly appreciated. Thanks in advance Mahesh B

sending documents from one document library to another

hi,   I'm encountering an error when trying to send a document from a document library to another document library in a separate web application using the send to > other location. Once I place the URL in the Destination document library or folder field and click test it opens the destination document library, however when I try to send the document I receive the error:   "could not find the destination item or folder on this server"   has anyone ever encountered this and if so how did you resolve it? Thanks in advance

Sharepoint 2007 - 80GB Documents in 1 document library

Hi, My customer wants 'customer docs' in SharePoint. It is now stored on several disks and wants to move it to SharePoint 2007(!). It needs to go into a folder structure.....I'm now investigating the information that needs to move to SharePoint and it turns out a quick scan resulted in 210.000 documents with a total volume of 80GB. Off course this is raw data and thus containing archives, zips, access databases and a lost movie and the like (just like any normal network drive :-)). When I look at the limits and best practices: no folder should contain more then 2.000 items (OK) no doc lib should contain more then 2.000.000 items (more then OK) no file should be larger then 2GB (OK - we set it to a max of 150MB) It is all fine but my concern is the shear size of the total load. Let's say they don't migrate 80GB but 30-50GB. My Question: can a single MOSS 2007 document library hold this kind of documents and total size? What does this mean for overall performance, backup, search indexing, crawling etc etc?  Thnx for any tips!

Uploading doc file into SharePoint Document library Programatically.

Hi all, I want to upload the doc file into SharePoint document library using the FileUpload control. For that I am created a new document library in my SharePoint site. But I am not getting the path of Document library where I want to upload the file. Waiting for your valuable response. Regards,-Kaustubh

Listing documents in Folders and subfolders in a Dataview of Document Library

My dataview is pointed to a Document Library. I noitced files in folders and subfolders don't list - only the folders themselves.  Is there any way to list files in a particular folder or all files in all folders? What I'm trying to do is tie a folder to entries in a custom list. I'd like a folder for every ID in that custom list. When I open the Dispform for the ID, I'd like a dataview or some other webpart to dynamically to show related files (all which would ofcourse just be in their respective folder). I'm thinking it's just a matter of passing the ID querystring to a condition in the Dataview or Webpart. It would also have to be a folder as I need to allow same file names to be uploaded.   Thanks.  
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