how to open a file using anchor tags from local file system in asp.net
<p>This function is fetching all the files from the specified directory and showing them as links on the webpage. but on clicking the link, browser is not opening the page, instead showing - " Server Error in '/fileUpload' Application. HTTP ERROR 400 - bad request"
I have tried all the possible combinations and ways for giving relative and absolute path. but problem persists.
please help.. </p>

<p>here is the function</p>

<p>protected void fetchDirFiles(string pattern)</p>

<p>{<br>
        string file_content;</p>

<pre><code>    string keyword = pattern; // pattern to be searched in files

    try
    {
        pattern = pattern + "*";

        string[] dirs = Directory.GetFiles(@"C:\\uploaded", "*");

        foreach (string dir in dirs)
        {

            file_content = File.ReadAllText(dir);
            string filename;
            if (file_content.Contains(keyword))
            {
                filename = Path.GetFileName(dir);
                Literal lit = new Literal();
                string root = Path.GetPathRoot(dir); //

                lit.Text = "&lt;a href ='c://uploaded'&gt;" + filename + "&lt;/a&gt;&lt;br/&gt;";
                this.form1.Controls.Add(lit);
            }
        }
    }
    catch (Exception e)
    {
        Console.WriteLine("The process failed: {0}", e.ToString());
    }
</code></pre>
