문제

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