I want to pass a parameter between two separate web parts I am developing. In my 'Detail' webpart i need to build a CAML query to display the correct profile based on their name.

pdquery.Query = "<Where><Eq><FieldRef Name='Name'/><Value Type='Text'>{parameter}</Value></Eq></Where>"

not sure how i get the parameter into the Query...is this even possible?

TIA.

S

share|improve this question

50% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Erm - you can just concatenate it into the string?

pdquery.Query = "<Where><Eq><FieldRef Name='Name'/><Value Type='Text'>"
                  + yourParameter + "</Value></Eq></Where>"
share|improve this answer
1  
where yourParameter = Page.Request.QueryString["yourParameter"] – Vardhaman Deshpande Oct 11 at 19:05
Yes ended up getting it about 5 minutes after I posted! Why it took me an hour to work that out I'll never know... – Stephen Oct 12 at 9:25
feedback

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.