2
Answers

load file from link to literal web control

Daniel Morais

Daniel Morais

14y
2.7k
1

Hi!
i hope you can answer me about this one
I have code that liste the file in a specific directory ad create link to eache files it find.
the code is
 

<%
  DirectoryInfo di;
  di = new DirectoryInfo(Server.MapPath("Admin/Data/"));
  FileInfo[] rgFiles = di.GetFiles("*.inC");
  foreach (FileInfo fi in rgFiles)
  {
   Response.Write("<br /><a href=Admin/Data/"+fi.Name+" target="+LtCView+">"+fi.Name+"</a>");
  }
%>


 
that work ok but it show the file in a new  browser page.
I want it to load to a literal control that i have on my page from te link create by that code
Is it possible if not howto please i am stok here with this
Thank's 
SORRY i have forgot to mention it's ASP.NET C#

Answers (2)