Greetings
Using Sharepoint online to fetch data on asp.net
Issued, its not fetching data based on query ( attached is snap short for reference )
How can I fetch data based on query ,as we usually do in CAML query .

Thanks
Greetings
Using Sharepoint online to fetch data on asp.net
Issued, its not fetching data based on query ( attached is snap short for reference )
How can I fetch data based on query ,as we usually do in CAML query .

Thanks
If the answer is working for this question, I suggest you can accept as answer so that it could also help others who have the same question in the forum :)
Thanks
Best Regards
Hi,
You can try this,
Enclose Where with View and Query,
camlQuery.ViewXml ="<View><Query><Where>rest of your query here</Where> </Query></View>"
Hi @MohammadQasim-1438 ,
Add <View><Query></Query></View> outside the real caml:
CamlQuery caml = new CamlQuery();
var id = 1;
caml.ViewXml = "<View><Query><Where><Eq><FieldRef Name='ID'/><Value Type='Counter'>"+id+"</Value></Eq></Where></Query></View>";
ListItemCollection items = list.GetItems(caml);
ctx.Load(items);
ctx.ExecuteQuery();
Thanks
Best Regards
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
4 people are following this question.