That is the code to get url of image from the folder
<asp:Repeater ID="rptImages" runat="server">
<ItemTemplate>
<li>
<img alt="" style='height: 75px; width: 75px' src='<%# Eval("Images") %>' />
</li>
</ItemTemplate>
</asp:Repeater>
This do display images
string[] filesindirectory = Directory.GetFiles(Server.MapPath("~/Images"));
List<String> images = new List<string>(filesindirectory.Count());
foreach (string item in filesindirectory)
{
images.Add(String.Format("~/Images/{0}", System.IO.Path.GetFileName(item)));
}
rptImages.DataSource = images;
rptImages.DataBind();
when i run it it says:" An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. "
and show :( List<String> images = new List<string>(filesindirectory.Count());
) in red
What should i do?