Create asp:Repeater with links from list of files in folder

mehdinasiri

New Member
I have an application that creates PDFs and stores them on a file within the website. I need to loop through each of those files and find documents with a specific name on it. I'm able to create that list without any issues, but getting stumped with the best method to create my linksThis is what I have so far:\[code\]string rootFolderPath = Server.MapPath("~/Forms/Offers");string listOfBidSheets = @"*" + prospect.LastName.Trim() + "_" + prospect.FirstName.Trim() + "*";string[] fileList = System.IO.Directory.GetFiles(rootFolderPath, listOfBidSheets);if (fileList.Length > 0){ rptPDFLinks.DataSource = fileList; rptPDFLinks.DataBind();}\[/code\]The part that is stumping me is what to put on the front-end of the code:\[code\]<li><%# DataBinder.Eval(Container.DataItem, "Item") %></li>\[/code\]Normally when I bind to a repeater the Container.DataItems are easy because they are column names.Any thoughts on where to take this? I'm open to different solutions all together.
 
Back
Top