i have a server link like: http://document.aaaa.com
in dat i hve create a folder name pdf where 100s pdfs are store with name like
xyz_Q1,xyz_Q2...
through front end i m taking the value depending on some conditions as only "xyz".
now i want to retreive all the files from server name xyz like the ouput will be xyz_Q1,xyz_Q2 ans so on and clicking on the file i want to open the file from server on different tab.
i m not able to map with server through code. this i hve done with the folder keeping on my computer with the help of following code:
DirectoryInfo dinfo = new DirectoryInfo("..\\Portals\\PDFs");
FileInfo[] finfo = dinfo.GetFiles(string.Format("{0}*.pdf", var));
lstpdfs.Items.Clear();
for (int i = 0; i < finfo.Length; i++)
{
list.Value = finfo[i].ToString();
lstpdfs.Items.Add(list.Value);
}
please suggest some way to do the above thing with the remote url as when i pass the url in the directory info i m getting the exception as we cant pass url. i also tried to do with server.mappath like:
DirectoryInfo dinfo = new DirectoryInfo(Server.MapPath("http://document.aaaa.com/foldername");
Please suggest how to solve