Monday, September 19, 2011

When item context menu clicks throws error - "The item no longer available"

After adding webparts programmatically, users might be facing an error - "The item no longer available. This item may be deleted by another user" This is very common issue. When adding a webpart to a pgae it is common to forget,
                               webpartmanager.SaveChanges(webpart)

this line of code. Include this code after adding webpart, things will be working fine...