Question

I have created a new master page to SharePoint 2010. Right now I'm just trying to make it work. I want to display who modified the page and when. This works great whit this code:

<SharePointWebControls:DateTimeField FieldName="Modified" runat="server" ControlMode="Display"/>

by

<SharePointWebControls:UserField FieldName="Modified By" runat="server" ControlMode="Display"/>

But my problem is that when i Load the SP-page with my master-Page this part of the page stays for 0.5 seconds and then disappears. My question is: Do you know how I can make the modified and modified by content to stay on my site?

Thanks for your help!

Was it helpful?

Solution

The Answer to my Question was that I had to put the cod from the question before this tag:

 <asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">

so my finished cod looks like this:

 <!-- Footer with Last modified/modified by and date of the day -->
        <div class="s4-notdlg" style="clear:both; background-color:white; padding:10px; margin-left:160px;">
            <div class="hide">
            <div>
                 Idag är det 
                 <script type="text/javascript">
                        var date = new Date();
                        document.write(date.toLocaleDateString());
                 </script>
            </div>

            Senast uppdaterat: 
            <SharePointWebControls:DateTimeField ID="DateTimeField1" FieldName="Modified" runat="server" ControlMode="Display"/> av 
            <SharePointWebControls:UserField ID="UserField1" FieldName="Modified By" runat="server" ControlMode="Display"/>
         </div>
        </div>

        <SharePoint:DeveloperDashboard ID="DeveloperDashboard1" runat="server"/>
    </div>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top