hai
iam developing a website using asp.net,c#(web location:file system ).
can any one help me...
i want to download the file that is displayed in the list box after the search.
i have done the searching of file from the server.
and the code i used is as follows:
resultsList.Items.Clear();
string s = "",s1="";
string filename = '*' + fileNameTextBox.Text + '*';
DirectoryInfo MyDir;
ArrayList CellarList = new ArrayList();
MyDir = new DirectoryInfo(Server.MapPath("files/"));
string path = (Server.MapPath("files/"));
string[] fileList = System.IO.Directory.GetFiles(path, filename);
foreach (string file in fileList)
{
s = file.ToString();
s1 = s.Replace(path, "");
resultsList.Items.Add(s1);
}
so plz help....
thanks in advance