Programmatically Aqra Lista & Ara Kontenut SharePoint

I ltqajna kompitu biex jaħdmu fuq l-iżvilupp l-applikazzjoni twieqi li se jġibu d-data Lista View minn Sharepoint u jipproċessa d-dejta fil-win tifforma app.

Preċedentement i użata li jġibu d-data bl-użu Lists.asmx,views.asmx.

Issa i sar jaf hemm mod ieħor biex jġibu d-data mill Lista View.

Sintassi:
https://myserver.com/_vti_bin/owssvr.dll?CMD = Display&Lista ={lista Id}&View ={View Id}&XMLDATA = veru

Eżempju URL:

https://myserver.com/_vti_bin/owssvr.dll?CMD = Display&Lista ={EA1BD05B% 2DDB5B% 2D434B% 2DB2FC% 2DB9AB9EE18A91}&View ={B959F555% 2D798B% 2D4F47% 2D9FBB% 2D81513B85F906}&XMLDATA = veru

Issa se tagħti l-XML data kif rispons.

jikteb ir-rispons għall xmldoc u jipproċessaw id-data.

HttpWebRequest = myRequest (HttpWebRequest)WebRequest.Create(“https://myserver.com/_vti_bin/owssvr.dll?CMD = Display&Lista ={EA1BD05B% 2DDB5B% 2D434B% 2DB2FC% 2DB9AB9EE18A91}&View ={B959F555% 2D798B% 2D4F47% 2D9FBB% 2D81513B85F906}&XMLDATA = veru”);

myRequest.Credentials =
System.Net.CredentialCache.DefaultCredentials;
HttpWebResponse rispons = (HttpWebResponse)myRequest.GetResponse();
Doc XmlDocument = XmlDocument ġdida();
doc.Load(response.GetResponseStream());

Leave a Reply

Tista 'tuża dawn it-tags HTML

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>