16 lines
529 B
Plaintext
16 lines
529 B
Plaintext
@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))
|
|
{
|
|
<option value="@(Model)">@(fileName)</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@(Model)">@(new DateTime(ticks).ToString("MM/dd/yyyy hh:mm tt"))</option>
|
|
}
|
|
} |