1
Reply

hyperlinking a file in c#

mahmud_uk

mahmud_uk

Jul 5 2004 7:35 AM
1.5k
Hi, I've wrote this script which by opening a dircetory through click of a button list all the files within the directory in the lisView Panel: private void Output_Click(object sender, System.EventArgs e) { System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(@"c:\Documents and Settings\encode\Desktop\output"); System.IO.FileInfo[] files = dir.GetFiles("*.*"); for (int i = 0; i < files.Length; i++) { listView1.Items.Add(files[i].Name);} Does anyone know what script will i need to insert in order to make sure when any of the files within the listView is clicked opens these files up from the directory folder, i.e. if word document is cliked then it would open the word document. I've tried Response.Redirect(SelectedFile.Name); but response is not reconginsed by the complier Urgently need help on this script, pleeeeease if anyone out there knows, response asap. Mac

Answers (1)