Get directory path file name from Client server C# and Asp.n
Dear sir,
now i am using this code server system available D:\pdfdoc folder working fine, but
i need get file name and folder path from Client system.
i saved client system D:\pdfdoc
please help me
DirectoryInfo d = new DirectoryInfo(@"D:\Pdfdoc");
FileInfo[] Files = d.GetFiles("*.pdf");
FileInfo[] subFiles = d.GetFiles("*.pdf", SearchOption.TopDirectoryOnly);
foreach (FileInfo file in Files)
{
string str = file.Name;
substr = str.Substring(0, 6);
string empid = lbl.Text + ".pdf";
if (str == empid)
{
string PDFFile = @"D:\Pdfdoc\" + substr + ".pdf";
lblfile.Text = "";
lblfile.Text = "Available";
lblfile.ForeColor = System.Drawing.Color.Green;
lblfilename.Text = PDFFile;
}
}