Home > Sharepoint > Download the Sharepoint List Attachment

Download the Sharepoint List Attachment

You can download the attachment from the any SharePoint List to your local drive in your Server using the following code. Based on the article from Microsoft “How to Pro grammatically Download attachment from list items in WSS” i iterate the list item and also i checked for Exist of attachment for each list item.

Inherited Web-part Class and create the button control and attach the click event, in the “CreateChildControls” method as below code

(Click on above image to Enlarge the Image)

Now write the code to download the attachment from the List as below in the Button Click event Method

(Click on above image to Enlarge the Image)
Now you create a custom web-part for download the attachment of the list. Create Strong key and build the class deploy it in your Server and update the Web.Config. Add it in web-part gallery and edit the page select the web-part to download attachment. that it. When you click on the web-part, it will automatically download all attachment to the specified path.

Advertisements
Categories: Sharepoint
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: