Error; while personalizing the page "The specified display mode is not supported on this page"

Last post 09-24-2004 7:16 AM by Fredrik N. 3 replies.

Sort Posts:

  • Error; while personalizing the page "The specified display mode is not supported on this page"

    09-24-2004, 3:47 AM
    • Member
      65 point Member
    • nileshr
    • Member since 09-07-2004, 2:12 AM
    • Posts 13
    Hi
    I am having 2 webzones in my aspx page with a webpartmanager.

    <asp:LinkButton ID="EditModeLinkButton" Runat="server" OnClick="EditModeLinkButton_Click">Personalize this Page</asp:LinkButton>
    <br />
    <asp:WebPartManager ID="WebPartManager1" Runat="server">
    </asp:WebPartManager>

    I also have a link button and onclick of that buttton am having a script as below:-

    "
    void EditModeLinkButton_Click(Object sender, System.EventArgs e) {
    if (WebPartManager1.DisplayMode == WebPartManager.BrowseDisplayMode)
    {
    WebPartManager1.DisplayMode = WebPartManager.EditDisplayMode;
    EditModeLinkButton.Text = "End Personalization";
    }
    else {
    WebPartManager1.DisplayMode = WebPartManager.BrowseDisplayMode;
    EditModeLinkButton.Text = "Personalize this page";
    }
    }
    "
    when i run my application and click on th link button to personalize the page it gives me the following error: -

    "The specified display mode is not supported on this page. Make sure personalization is enabled and the corresponding zones are present on the page. The display mode can be set during and after Page_Init. Parameter name: value".

    Can anybody help me resolve this error?
  • Re: Error; while personalizing the page "The specified display mode is not supported on this page"

    09-24-2004, 5:05 AM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 5:03 AM
    • Sweden
    • Posts 5,334
    • TrustedFriends-MVPs
    You must add a EditorZone to your page before you can use the EditDisplayMode, for example:


    <asp:EditorZone ID="EditorZone1" Runat="server">
    <ZoneTemplate>
    <asp:BehaviorEditorPart Runat="server" ID="BehaviorEditorPart1" />
    </ZoneTemplate>
    </asp:EditorZone>

    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
  • Re: Error; while personalizing the page "The specified display mode is not supported on this page"

    09-24-2004, 5:39 AM
    • Member
      65 point Member
    • nileshr
    • Member since 09-07-2004, 2:12 AM
    • Posts 13
    Thanks Fredrick.
    Can you help me explain what actaully is tht editorzone and behavioureditorpart required for?
    I am surpised tht just because of adding these lines my code is working as expeccted?

    please suggest.
  • Re: Error; while personalizing the page "The specified display mode is not supported on this page"

    09-24-2004, 7:16 AM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 5:03 AM
    • Sweden
    • Posts 5,334
    • TrustedFriends-MVPs
    When you switch the mode of your WebPartManager to Edit mode, you can edit the WebParts. By editing a WebPart the EditorParts added to the EditorZone will be displayed. The BehaviorEditorPart is one of four EdirotParts.

    A list of the four EditorParts shipped with ASP.Net 2.0:

    BehaviorEditorPart
    AppearanceEditorPart
    LayoutEditorPart
    PropertyGridEditorPart

    With the editor part you can customize the WebPart.

    To read more about this you can read this post on my blog
    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
Page 1 of 1 (4 items)