{"id":127,"date":"2010-12-12T20:10:00","date_gmt":"2010-12-13T02:10:00","guid":{"rendered":"https:\/\/www.chrystalsander.com\/blog\/?p=127"},"modified":"2010-12-12T20:10:00","modified_gmt":"2010-12-13T02:10:00","slug":"locating-your-current-context-in-sharepoint","status":"publish","type":"post","link":"https:\/\/www.chrystalsander.com\/blog\/?p=127","title":{"rendered":"Locating Your Current Context In SharePoint"},"content":{"rendered":"<p>To get your current location in SharePoint use:<\/p>\n<p><span style=\"font-family: courier new;\">SPControl.GetContextWeb(Context)<\/span><\/p>\n<p>If you need to find the subweb, there is a web property in the SPWeb object you retrieved in the above code:<\/p>\n<p><span style=\"font-family: courier new;\">SPWeb currentWeb = Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(Context)<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get your current location in SharePoint use: SPControl.GetContextWeb(Context) If you need to find the subweb, there is a web property in the SPWeb object you retrieved in the above code: SPWeb currentWeb = Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(Context)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"_links":{"self":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/127"}],"collection":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=127"}],"version-history":[{"count":0,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/127\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}