Code
@{
string filetype = Model.FileLocation.Split('.')[1];
}
@if (filetype == "jpg")
{Code
}
else if (filetype == "mp4" || filetype == "flv")
{
if (System.IO.File.Exists(Server.MapPath(Model.FileLocation)))
{TypeScript
@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)
Answers
Know the answer? Post it. Somebody with the same question will find it here.