Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

camlquery.ViewXml syntax question in client object model

$
0
0

Hello,

While retrieving items from list using CAML query, someone had used below syntax:

SP.CamlQuery camlQuery = new SP.CamlQuery();

camlQuery.ViewXml =@"<View><Query><Where><Eq><FieldRef Name='Name'/><Value Type='Text'>Shailesh</Value></Eq></Where></Query></View>";


And someone used below:


CamlQuery camlQuery = new CamlQuery();  
camlQuery.ViewXml = "<View><Query><Where><Geq><FieldRef Name='ID'/>" +"<Value Type='Number'>19</Value></Geq></Where></Query><RowLimit>100</RowLimit></View>";

So, I have general(may be stupid, but not aware of..so) questions as,

1. Why "@" in one query, and not in another?

2. why SP.CamlQuery in first query and CamlQuery in another while declaring object

Please advice.

Thanking you in advance.

Regards,

Jayashri






Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>