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.
精彩评论