سؤال

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.

هل كانت مفيدة؟

المحلول

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

More details : MSDN

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top