Check if a SharePoint page is in edit mode
Everyone who ever created a MasterPage for SharePoint certainly used the EditModePanel control, to show some controls only in "edit" mode. I use the EditModePanel control to load some javascript and css when the page is in edit mode. This is useful when I want to correct webparts, which are to small a.s.o. <PublishingWebControls:EditModePanel runat="server" id="EditModePanelJSNone"> <script type="text/javascript"> /* <![CDATA[ */ Editmode = true; /* ]]> */ </script> </PublishingWebControls:EditModePanel> Now I realized that this control doesn't function when it is used with personalized pages. A personalized page saves a snapshot of the page either in edit or display mode. So I had to check per javascript if a page is in edit mode. Since each of my pages have a webpart zone and a webpartzone has a edit banner in edit mode, I check if this banner exists, by searching after a image that only ...