Do you mean attachments (aka attach files to an external sharepoint site)? If so here is a code that should do the trick for you:
WebClient loClient = new WebClient();
loClient.Credentials = new NetworkCredential(Utility.GetConfigKey("SharePoint ACCOUNT"), Utility.GetConfigKey("SP Account Password"), "Domain Name");
byte myDataBuffer = loClient.DownloadData(new Uri(Utility.GetConfigKey("SharePoint URL") + lsFileName));
// Clear all content output from the buffer stream
// Add a HTTP header to the output stream that specifies the default filename// for the browser's download dialog
Response.AddHeader("Content-Disposition", "attachment; filename=" + lsFileName);
// Add a HTTP header to the output stream that contains the// content length(File Size). This lets the browser know how much data is being transfered
// Set the HTTP MIME type of the output stream
Response.ContentType = "application/octet-stream";
// Write the data out to the client.
lblFormError.Text = "Unable to add document to sharepoint list location";
My company needs to simplify the posting of documents to Production(public) and Archives(non-public) folders. When a document is published to Production it is linked to a hard coded URL and therefore always has the same name titled (i.e. Help Desk Answers) without a version number attached. However, we need a static number attached to the document that will go to the Archive folder as well. An example would be that I create the first "Help Desk Answers" document for the month of October and then I create a second "Help Desk Answers" in November. I need to have the Archives(non-public) folder reflect that there are two "Help Desk Answers" documents now, while the document in Production(public folder) is still called just "Help desk Answers" and is the most recent document in Production. My first thought is to some how customize the "Send To" menu but if there is a better idea out there please let me know Thanks for your help!