Online Training On SharePoint

Thursday, 23 October 2008

Accessing Multiple Document Control from Application Pages in SharePoint

We got a requirment where user needs to select the Document Library (We have 100's of Document Libraries) and upload multiple documents into the selected Document Library from a page other than OOB Pages. Since SharePoint comes with in built Multiple Document control we decided to use that and call this from an Application Page.

Multiple document upload control is an Active X control.In SharePoint we have “Upload.aspx” page in %\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS. This page contains Multiple Document Upload Control which is used by all the sites in the site collection to upload multiple documents. I copied the content of this file into another file with the name upload1.aspx for safety.

Following are the arguments which this control accepts:

1. List GUID - GUID of the list in which the docs will be uploaded
2. Root Folder - If we need to upload the docs in the folders inside the libraries. Not using this parameters.
3. Source - Not using this.
4. MultipleUpload - 1 indicates to use multiple document upload control

We have put a button in the application pages and redirected it using Response.Redirect with these 2 parameters. This opened the multiple document upload control and while uploding the documents uploaded into the List selected as the first parameter.
Post a Comment
Related Posts with Thumbnails