Ibahagi sa


How to: Disable Web Parts Personalization

Web Parts personalization is enabled by default on Web Parts pages. However, you might want to disable it in certain cases. For example, you might have a website where many pages use Web Parts controls and personalization. There might be certain pages where you want the benefits of Web Parts features such as modular layout and the ability to create connections between static Web Parts controls, but you also want the pages to remain read-only, meaning that users cannot personalize or modify them. In such cases, you can disable personalization using the WebPartManager control on a Web Parts page.

Disabling Web Parts Personalization

To disable Web Parts personalization for a page

  1. Open the Web Parts .aspx page and locate the <asp:webpartmanager> element.

  2. Add the personalization-enabled attribute to the <asp:webpartmanager> element, and set its value to false, as in the following code example.

    <asp:webpartmanager runat="server" id="wpmgr1" 
      personalization-enabled="false" />
    

    Personalization is now disabled on the page.

See Also

Concepts

Web Parts Personalization Overview

Requirements for Using Web Parts Personalization