I have a Controller action ActionResult which is listing all files in directory as:
public ActionResult Index()
{
string[] txtFiles = Directory.GetFiles(Server.MapPath("~/TextFiles/"));
return View(txtFiles);
}
and in index.cshtml I have
@model List<txtFiles>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<ul>
@foreach (var i in Model)
{
<li>@Html.ActionLink(System.IO.Path.GetFileName(i), "FileContent")</li>
}
</ul>
but I am not sure what should I pass in model? I already tried
@model List<txtFiles> but it didn't work and I am getting this error

@model IEnumerable<string>