- if (FileUpload1.PostedFile != null)
- {
- SPSite spsite = new SPSite("http://" + Page.Request.Url.Host.ToString().Trim() + "/sites/RapexChina/AvisoManage/Lists/List9/");
- SPWeb spweb = spsite.OpenWeb();
- Stream stream = FileUpload1.PostedFile.InputStream;
- byte[] buffer = new byte[stream.Length];
- stream.Read(buffer, 0, (int)stream.Length);
- stream.Close();
- spweb.Files.Add("http://" + Page.Request.Url.Host.ToString().Trim() + "/sites/RapexChina/AvisoManage/Lists/List9/", buffer);
- }
列表库上传附件
最新推荐文章于 2023-07-03 17:17:15 发布