文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>.net 上传文档到sharepoint的2种方法

.net 上传文档到sharepoint的2种方法

时间:2010-09-28  来源:中级程序员

        listService.Credentials = credit;
        listService.UnsafeAuthenticatedConnectionSharing = true;
        //listService.u
        try
        {
            listService.AddList("qiang", "ll", 100);

   <Method ID=""1"" Cmd=""New"">
      <Field Name=""ID"">New</Field>
      <Field Name=""Title"">qiang2</Field>
   </Method>

            elBatch.SetAttribute("ListVersion", "1");
            elBatch.InnerXml = mode;
            listService.UpdateListItems("doc", elBatch);

                ex.Detail.InnerText + "\nStackTrace:\n" + ex.StackTrace);
        }

还有一种是通过splistitem 来处理,代码如下

        {
            //site.c

                SPItem item= list.Items.Add("jake", SPFileSystemObjectType.File);
              
               // SPListItem item = list.Items[1];
               
                //SPAttachmentCollection attachments = item.Attachments;
              
                Response.Write("<br><br>" + list.ID);
                // item.i
                //  item.Attachments.AddNow(FileUpload1.FileName, FileUpload1.FileBytes);
            }

但这两种都只是针对普通的自定义列表添加附件形式来实现.

同时可能会考虑到另外一种情况,是要把上传到文档库,然而这个东西,我现在一直在试,如果用spsite,是能解决问题?然而用spsite一定要在sharepoint服务上处理,如果离开sharepoint服务器,处理不了.这的确比较麻烦.

而用webservice,到现在都还没有找到方案.真是悲哀啊.

不知哪位高手有碰过这问题?还不忘赐教.

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载