locked
last modified date in wss 3.0 RRS feed

  • Question

  • Hi folks, 

    I'm trying to insert a "last modified date" to my sharepoint site so that all users visiting the site can see when things were last updated.

    I used the code on the master page suggested here http://geekswithblogs.net/SharePointCherie/archive/2009/09/14/adding-a-last-modified-date-on-sharepoint-pages.aspx

     

    however When i put the last part of code in where i want the date to appear, my sharepoint site will no longer load,

    just get error messages, can't even load the default page until i remove the code again. Any suggestions or ideas why this would be happening, or am i just putting the code in all the wrong places on the site for this error to be caused. I thought I could put it anywhere on the page i wanted it to appear?

     

    • Moved by Mike Walsh FIN Thursday, June 23, 2011 11:17 AM customization q (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    Thursday, June 23, 2011 9:09 AM

Answers

  • Hi ICTDUDE,

    The DateTimeField control is available in WSS 3.0. Please don’t put the code into PlaceHolderMain, and also don’t break other pairs of tag or add the code inside another control.
    For instance, if you want to put the control at the bottom of the page, first place

    <%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    above <HTML> tag.

    Then find

    <td class="ms-pagebottommarginleft"><IMG SRC="/_layouts/images/blank.gif" width=1 height=10 alt="">
    </td>

    or

    <td class="ms-bodyareapagemargin"> </td>

    insert following code just before </td> tag.

    Last modified at: <SharePointWebControls:DateTimeField FieldName="Modified" runat="server" ControlMode="Display"/>by <SharePointWebControls:UserField FieldName="Modified By" runat="server" ControlMode="Display" />

    Regards,
    Emir
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact tnmff@microsoft.com.

    Friday, June 24, 2011 3:40 AM

All replies

  • Try putting it within a Page layout tag and see what happens.  Doesn't look like it should be presenting problems.


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/
    Thursday, June 23, 2011 1:05 PM
    Answerer
  • Hi ICTDUDE,

    The DateTimeField control is available in WSS 3.0. Please don’t put the code into PlaceHolderMain, and also don’t break other pairs of tag or add the code inside another control.
    For instance, if you want to put the control at the bottom of the page, first place

    <%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    above <HTML> tag.

    Then find

    <td class="ms-pagebottommarginleft"><IMG SRC="/_layouts/images/blank.gif" width=1 height=10 alt="">
    </td>

    or

    <td class="ms-bodyareapagemargin"> </td>

    insert following code just before </td> tag.

    Last modified at: <SharePointWebControls:DateTimeField FieldName="Modified" runat="server" ControlMode="Display"/>by <SharePointWebControls:UserField FieldName="Modified By" runat="server" ControlMode="Display" />

    Regards,
    Emir
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact tnmff@microsoft.com.

    Friday, June 24, 2011 3:40 AM