问题很清楚,我知道如何在c#中从属性包中读取属性
但是现在我需要知道如何在jquery或SPServices中做到这一点。知道吗?
谢谢
var webProperties;
function getWebProperties() {
var clientContext = new SP.ClientContext.get_current();
webProperties = clientContext.get_web().get_allProperties();
clientContext.load(webProperties);
clientContext.executeQueryAsync(function.createDelegate(this, this.getPropertyBagSuccess), function.createDelegate(this, this.getPropertyBagFail));
}
function getPropertyBagSuccess() {
var propertyBag = webProperties.get_fieldValues();
if(propertyBag.YourProperty != undefined)
{
alert(propertyBag.YourProperty);
}
else
{
alert("property not found!");
}
}
function getPropertyBagFail(args, sender)
{
alert("error trying to read propertybag");
}