Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to retrieve rendered Sharepoint WebPart Data using Client Object Model
    primarykey
    data
    text
    <p>I am trying to access data remotely from sharepoint 2010 site using client object model. For some restrictions I am not able to use CAML query even if I use I am not able to filter for proper audiences based on user login (if you can help me regarding the CAML query is also fine :: i do not know how to get current user audience name and all audiences using CAML/client object model. This code sits on the mobile site and calling the share point site as shown in my code). This following code works good but not able to get the content from the webpart. Can someone help regarding this. </p> <pre><code> using (ClientContext ctx = new ClientContext("https://mysite.com/Pages/Default.aspx")) { ctx.ExecutingWebRequest += new EventHandler&lt;WebRequestEventArgs&gt; (clientContext_ExecutingWebRequest); File home=ctx.Web.GetFileByServerRelativeUrl("/Student/Pages/default.aspx"); //get the web part manager Microsoft.SharePoint.Client.WebParts.LimitedWebPartManager wpm = home.GetLimitedWebPartManager(Microsoft.SharePoint.Client.WebParts.PersonalizationScope.Shared); IEnumerable&lt;Microsoft.SharePoint.Client.WebParts.WebPartDefinition&gt; wpds = null; //create the LINQ query to get the web parts from //the web part definition collection wpds = ctx.LoadQuery(wpm.WebParts.Include(wp =&gt; wp.Id,wp =&gt; wp.WebPart)); //load the list of web parts ctx.ExecuteQuery(); //enumerate the results foreach (Microsoft.SharePoint.Client.WebParts.WebPartDefinition wpd in wpds) { string title= wpd.WebPart.Title; Microsoft.SharePoint.Client.WebParts.WebPart wpart = wpd.WebPart; ????? How to render and receive the data (looking for the same data When you browse the site with the browser) } Code continues... </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload