0
A
回答
0
For getting the list item field information
public void LoadPropertyInfo()
{
using (context = new ClientContext(siteCollectionUrl))
{
spWeb = context.Web;
propertiesList = spWeb.Lists.GetByTitle(listName);
FieldCollection fields = propertiesList.Fields;
context.Load(fields);
SP.CamlQuery query = new SP.CamlQuery();
query.ViewXml = string.Format("<View><Query><Where><Eq><FieldRef Name=\"{0}\" /><Value Type=\"Text\">{1}</Value></Eq></Where></Query></View>", propertyID, PropertyIDValue);
listItems = propertiesList.GetItems(query);
context.Load(listItems);
context.ExecuteQueryAsync(GetRequestSucceeded, RequestFailed);
}
}
Pass the item id here for getting the attachments
private void GetAttchmentCollection(string id)
{
string RedirectHost = string.Empty;
string Host = string.Empty;
context = SP.ClientContext.Current;
RedirectHost = serviceUrl + "_vti_bin/Lists.asmx";
BasicHttpBinding binding = new BasicHttpBinding();
if (System.Windows.Browser.HtmlPage.Document.DocumentUri.Scheme.StartsWith("https"))
{
binding.Security.Mode = BasicHttpSecurityMode.Transport;
}
binding.MaxReceivedMessageSize = int.MaxValue;
EndpointAddress endpoint = new EndpointAddress(RedirectHost);
ServiceReference1.ListsSoapClient oClient = new ServiceReference1.ListsSoapClient(binding, endpoint);
oClient.GetAttachmentCollectionCompleted += new EventHandler<ServiceReference1.GetAttachmentCollectionCompletedEventArgs>(oClient_GetAttachmentCollectionCompleted);
oClient.GetAttachmentCollectionAsync(listName,id);
}
Your can try this link too.
http://helpmetocode.blogspot.com/2011/11/managed-client-object-models-in.html
相關問題
- 1. SharePoint 2010 - 客戶端對象模型 - 將附件添加到ListItem
- 2. 使用SharePoint 2010客戶端對象模型編輯文件
- 3. 使用客戶端對象模型Sharepoint 2010填充Treeview
- 4. SharePoint 2010 - 客戶端對象模型 - 批准文件
- 5. SharePoint 2013 Online - 添加附件:客戶端對象模型
- 6. SP 2010附加文件客戶端對象模型
- 7. Sharepoint客戶端對象模型出錯
- 8. SharePoint 2013 JavaScript客戶端對象模型
- 9. 使用客戶端對象模型訪問sharepoint 2010週期性事件
- 10. 獲取listItem.fieldValues的列表客戶端對象模型Sharepoint 2010
- 11. 錯誤而在客戶端對象模型的SharePoint 2010
- 12. SharePoint Foundation 2010的客戶端對象模型驗證
- 13. 在javascript客戶端對象模型中的SharePoint 2010 SP.FileCreationInformation()
- 14. vb.net客戶端對象模型:查看Sharepoint 2010的內容wikipage
- 15. 讀取列表項目Sharepoint 2010客戶端對象模型
- 16. SharePoint 2010客戶端對象模型的推薦書籍?
- 17. 的SharePoint 2010客戶端對象模型 - 的Kerberos /宣稱驗證
- 18. SharePoint 2010客戶端對象模型 - 需要代理驗證
- 19. Sharepoint 2010客戶端對象模型從Url獲取列表項
- 20. 使用客戶端對象模型
- 21. 使用客戶端對象模型
- 22. 使用SharePoint客戶端對象模型重命名文件?
- 23. sharepoint 2010客戶端對象搜索
- 24. 從Sharepoint客戶端獲取weburl客戶端對象模型
- 25. 如何使用客戶端對象模型在Sharepoint 2010中創建文檔庫
- 26. 以編程方式使用客戶端對象模型獲取ListItemVersion SharePoint 2010
- 27. Sharepoint 2010用戶身份驗證(Windows憑據)與客戶端對象模型
- 28. 使用客戶端對象模型sharepoint獲取日期字段
- 29. 使用SharePoint客戶端對象模型監聽列表更新
- 30. 爲什麼在SharePoint中使用客戶端對象模型2013