@{
string filetype = Model.FileLocation.Split('.')[1];
}
@if (filetype == "jpg")
{
}
else if (filetype == "mp4" || filetype == "flv")
{
if (System.IO.File.Exists(Server.MapPath(Model.FileLocation)))
{
@Html.ActionLink(@Resources.LatestUpdate.DownloadVideoFile, "Download", new { filePathWithName = Model.FileLocation , @style="margin-left:40px"}) |
}
}
@*// *@
@*@Html.LabelFor(m => m.file)*@
@Resources.LatestUpdate.UpdatePhotoOrVideo
@Html.TextBoxFor(m => m.file, new { @style = "margin-left:40px", type = "file", @id = "fileDescription" })
@Html.ValidationMessageFor(m => m.file)
Replies
Know the answer? Post it — somebody with the same question will find it here.