Sharepoint dynamic caml query problem?
Posted
by AB
on Stack Overflow
See other posts from Stack Overflow
or by AB
Published on 2009-12-31T14:10:10Z
Indexed on
2010/03/30
15:33 UTC
Read the original article
Hit count: 611
Hi,
I want to dynamic caml query based on query string.Let me explain it with example
my query sting can be anything
?cat=ABC&cat=ABD&cat=ABE...
?Cat=ABC
?Cat=ABC&cat=ABL
so no. can be anything now the problem begins
I want to query my sharepoint list based on this query string
if (HttpContext.Current.Request.QueryString["cat"] != null)
{
string _cat = HttpContext.Current.Request.QueryString["cat"].ToString();
}
so this way my string contains all the query
string _cat=ABC,AD,....all.
I want to query my sharepoint list based on these query string and with "AND"
where title=ABC and title=AD ....
if there is only one query string then only
where title=ABC
....so I want my query string should be dynamic....
Any idea how to acheive this??
© Stack Overflow or respective owner