Вопрос

Cannot set programmatically the title of my SP page - i mean to the SPWeb object:

web.Title = "...";
web.Update();

The changes are set only after one more refresh of the page. But i need the correct title text on the first load..

When i tried to debug the code, all looks good. the title text appear correctly, so i can't understand where is the problem ?..

Just to add clearence to my question:

The difference between text is the not equal basic data of different users - (simple AD external operation) but for now each one of them see data of other users..!

Это было полезно?

Решение

I found a soloution to the question: I was modifying SPWeb object which i created in USING statement and on the end it was disposed by the program, and so the changes..

what i should do to prevent this "strange" error was to write:

SPContext.Current.Web.Title = "...";
SPContext.Current.Web.Update();

without the using statement ..

Hope it will help somebody one day

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top