It works fine for me.
I also have some small problem from the beginning. Here is what I have done to make it work;
I’ve added the WebPartManager into the MasterPage it self.
I also put the code that changes the mode of the WebPartManager into the MasterPage:
WebPartManager.Current.SetDisplayMode(WebPartDisplayMode.Edit);
<asp:linkbutton runat="Server" id="perzonalizeWorkspace" onclick="personalize_Click">Personalize this page</asp:linkbutton>
void personalize_Click(object sender, System.EventArgs e)
{
WebPartManager.Current.SetDisplayMode(WebPartDisplayMode.Edit);
}
Maybe you wonder why I put it into the MasterPage. It’s because I will use WebParts in all of my pages and it’s a good place to add it.
/Fredrik Normén -
fredrikn @ twitterMicrosoft MVP, MCSD, MCAD, MCT
ASPInsidersMy Blog