开发者

Should I call SPWeb.Update after changing the value of ParserEnabled

If I have the following code:

var web = SPContext.Current.Web;
web.ParserEnabled = false;
// !!! is web.Update() required here?
// ...
// add a document or otherwise change things
// ...
web.ParserEnabled = true;

Do I have to explic开发者_开发技巧itly call the Update method to commit the change to the ParserEnabled property or is it checked at runtime by the methods that care about it?


You don't have to call .Update() when you change other properties that aren't persisted to the database (.AllowUnsafeUpdates for example), so I don't think you'll need to do that here.

If you encounter issues, you can always try adding the call to your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜