-
Blog Networks
-
Archives
- February 2010 (5)
- November 2009 (4)
- October 2009 (3)
- September 2009 (2)
- August 2009 (2)
- July 2009 (3)
- April 2009 (4)
- March 2009 (11)
- February 2009 (1)
- November 2008 (1)
- June 2008 (1)
- April 2008 (1)
- March 2008 (3)
- September 2007 (1)
- August 2007 (1)
- July 2007 (2)
-
Recent Posts
CLUSTER MAP
Tag Cloud
70-541 All Files Attachment Certification Configuration ContentType Copy CopyInToItems Copy WebService CreateWorkSpace Database Database Categories Download Download Document Error Excel Calculation Services Excel Services Expression Blend 3 Extensions Feature File GetItem Hidden List InternalName jQuery Library Links List ListIte Lists List URL MOSS MOSS 2007 Navigation SharePoint SharePoint-2010 SharePoint Database Silverlight SP2010 New Features SPQuery Sql Query Tips Series Upload User Information List WebService
Posted by Shantha Kumar on 31st March 2008
4
Uploading File from Local Machine to SharePoint ListItem as an attachment
To attach the file from Local Machine to SharePoint ListItem as an attachment, Import the System.IO namespace to use the Stream Class to read the file contents.
Use System.Web.UI.WebControls.FileUpload control is named as fileUpload in code.
Sample code for uploading the file from Local Machine to ListItem attachments as follows,
//Check the FileUpload control has the file
if (fileUpload.PostedFile [...]
