1

How can I get access to the parameters in SharePoint 2010's Site Options / Parameters area from a site page? I am looking to create a global variable to use in constructing a querystring and wasn't sure how to get this parameters value back.

1 Answer 1

0

you need to open the web for your specific site and then use get it using all Properties

    using(SPWeb siteCollection = currentInstance.OpenWeb())
    {
         if(siteCollection.AllProperties.ContainsKey("Your key name"))
             return (string) siteCollection.AllProperties("Your Key Name");
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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