Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4088114
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:56:26+00:00 2026-05-20T18:56:26+00:00

We would like to embed some code in each ASP.NET page that queries its

  • 0

We would like to embed some code in each ASP.NET page that queries its “Last Modified Date” and displays it at the bottom of the page.

In the past, we’ve relied on the person making any changes to the page to manually update the “This page last modified on (todays date)” text at the bottom of the page. Many times they forget to update this, which is causing some confusion as to when the information was last updated on that particular page. Since the site is not based on a CMS which could store this information in its back-end database, we’re trying to do the determination as to when the page was last saved from the file system on the server and include that date in the text of the page.

I’m not sure how a page’s being based on a Master Page plays into the “last modified date”. What we’re really looking for is for the content page file’s LMD get queried so we can embed that in the text of the page and not the LMD of the Master Page it’s based on.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:56:27+00:00Added an answer on May 20, 2026 at 6:56 pm

    Figured I’d post the answer to my question so that others can benefit.

    My solution was to add a label control to your Master Page where you want the “Modified: + date saved” information displayed. We put ours in the footer:

    Modified: <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    

    Then create a “Page_Load” event to the Master Page code behind (this website uses code behind and VB) and add the following code:

    Dim strPath As String = Request.PhysicalPath
    Label1.Text = "Modified: " + System.IO.File.GetLastWriteTime(strPath).ToString()
    

    When the page loads, it will execute the code above and replace the “Label” text with the date the file was last saved to disk.

    Hope this helps.

    (If you know a better way, feel free to educate us in a comment)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to embed a Python interpreter into my .NET application. I'm aware
My client would like a youtube channel embed that has a playlist style sidebar
I would like to embed a css file using [Embed(source = 'mystyle.css', mimeType =
I would like to make sure that when user log in it will stay
I'm working on a tool that generates C code from a specification. Users thus
I would like to place Icons or Images or User Controls inside the activity
I would like to solve the following problem using constraints but i actually don't
I'm building an app that needs to be able to extend facebook graph data.
I have a page using Paypal Payments Standard with buy one now buttons on
I hit this weird namespace issue when adding my first 'Service Reference' to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.