I'm trying to display every images in specific folders based on the folder name which equivalent to Model.Id.
@foreach (var imgPath in Directory.GetFiles(Server.MapPath("~/menu/" + Model.Id), "*.jpg"))
{
var img = new FileInfo(imgPath);
<img src="@Url.Content(String.Format("~/menu/449/{0}", img.Name))" />
}
In the last line, 449 is the folder name. How can I use Model.Id to replace 449? I'm not sure how to do that using String.Format