SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Grab a specific property bag using ECMA script

I would appreciate if some paste a sample code to get the property bags values using ClientContext?

share|improve this question

marked as duplicate by Falak Mahmood, Kit Menke Jun 18 '12 at 15:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Could you please write some more text explaining what this is really, about, so we can use it to help eachother better in the future. That would be awesome :-) – CodeMonkey Jun 18 '12 at 11:14
it was a duplicated post and already been answered. – Geek Jun 18 '12 at 11:55
up vote 0 down vote accepted

There was recent discussion here regarding the very same topic. Refer to this thread: Grab a specific property bag using ECMA script

share|improve this answer

Just to complete the answer provided in the link. If your property bag value is a plain text, not a serialized xml settings (as in the other question), you can use get_item function directly:

function getWebPropertyValue(key) {
    var ctx = SP.ClientContext.get_current()
    var web = ctx.get_web()
    var props = web.get_allProperties()
    ctx.executeQueryAsync(function() {
        var value = props.get_item(key);
    }, function() {alert("failed");})

share|improve this answer
+1 Thank you, it has already been answered by the person above :) – Geek Jun 18 '12 at 13:58

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