@model string @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @if (!string.IsNullOrEmpty(Model) && File.Exists(Model)) { string nowTicks = DateTime.Now.Ticks.ToString(); string fileName = System.IO.Path.GetFileNameWithoutExtension(Model); if (fileName.Length != nowTicks.Length || !long.TryParse(fileName, out long ticks)) { } else { } }