문제

Amidst working on resolving this issue, there's something I was curious about, and something that I've been very inconsistent about in my code.

If you enable SPWeb.AllowUnsafeUpdates = true, do you have to call SPWeb.Update() for that to be in effect? Or is just the one statement sufficient? I re-examined the WSS 3.0 SDK to look it up again, but either it's buried in a really random article or they aren't explaining it well.

I imagine that whatever is the case for setting it to true, it'll be the same for setting it to false in the finally block.

도움이 되었습니까?

해결책

You do not need to call SPWeb.Update() because the AllowUnsafeUpdates property is not persisted. (Reference Best Pattern for AllowUnsafeUpdates)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top