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:
try
{
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
Response.Clear();
// 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
Response.AddHeader("Content-Length", myDataBuffer.Length.ToString());
// Set the HTTP MIME type of the output stream
Response.ContentType = "application/octet-stream";
// Write the data out to the client.
Response.BinaryWrite(myDataBuffer);
}
catch
{
lblFormError.Text = "Unable to add document to sharepoint list location";
}
Pete Soheil DigiOz Multimedia http://www.digioz.com