Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am using the SharePoint client object model to create a web part.
I have a list on the parent site. This list has a field that is a choice field, with choices for all the subsites under the parent site. I am building a web part that will display items from the list on the parent site, but only if the item has that site's name in the above mentioned field. My problem is how do I get the current site? I know with the server object model, I can use SPContext.Current.Web. Alas, I cannot use the server object model. Can I accomplish something similar with the client object model?

Thank you in advance.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You'll find desired object in Client Object Model under the clientContext object.

More details : MSDN

share|improve this answer
    
I know it's late, but this helped, thanks! –  wjervis Oct 25 '13 at 17:59

Your Answer

 
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.