Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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");
    }
share|improve this answer
add comment

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.