views:

337

answers:

0

I'm required to include the last modified date on every page of my applications at work. I used to do this by including a reference to <%= LastModified %> at the bottom of my WebForms master page which would return the last modified date of the current .aspx page. My code would even check the associated .aspx.cs file, compare the last modified dates, and return the most recent date.

Does anyone know if you can read the FileInfo of a MVC View? I would like to include it in the master page, if possible.

I have a base controller that all wired up and ready to go. All I need to know is how to access the FileInfo of the current view.

namespace MyMVCApp.Controllers
{
    public abstract class SiteController : Controller
    {
        public SiteController()
        {
            ViewData["modified"] = NEED TO GET FILEINFO OF CURRENT VIEW HERE;
        }
    }
}