protected void Button1_Click(object sender, EventArgs e)
{
System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(@"C:\Documents and Settings\Admin\Desktop\New Folder\"+TextBox1.Text);
foreach (System.IO.FileInfo file in dir.GetFiles())
{
HyperLink h = new HyperLink();
h.NavigateUrl = "file:///c:/Documents and Settings/Admin/Desktop/New Folder/" + TextBox1.Text + "/" + file.Name;
h.Text = file.Name;
PlaceHolder1.Controls.Add(h);
}
}
On execution of this code hyperlinks get generated but they are not working. nothing happens when i click on them.
Please help.