User-932576310 posted
i try to show image on image folder locate on server
i only get file name, how to show image also ?
here code i try please advice, thank you
@using System.Web;
@using System.IO;
@{
Page.Title = "open image";
Layout = "~/adminpage/_SiteLayout.mobile.cshtml";
DirectoryInfo path = new DirectoryInfo( HttpContext.Current.Server.MapPath("~/Images/Product"));
System.Collections.Generic.List<string> urls = new System.Collections.Generic.List<string>();
//string newimage = System.IO.File.Open(path);
}
<div>
<ul>
@foreach (FileInfo image in path.GetFiles())
{
<li> @image, (show the image here )</li>
}
</ul>
</div>