Wednesday, October 17, 2007

Couldn't publish page content in MOSS 2007

The error message is:

This page contains content or formatting that is not valid. You can find more information in the affected sections

The problem:
If you put control with associated validation controls in the master page - asp.net Login control for example, the page validation couldn't process the page correctly and page couldn't be save when it is in edit mode.

The solution:
put your asp:Login tag in EditModePanel and set PageDisplayMode="Display"
This code will render the Login control only in display mode, not in edit.




Good luck

1 comment:

  1. but what if I need the web-part in the edit mode as well?
    I mean, the web-part I have has configurable parameters, so to provide properties to it, it needs to be available in the editmode as well.

    What do you recon to do in this case?

    ReplyDelete