Save a file where user wants, and in HTML or XML format only
<p>I'm developing a web application using asp.net. There is a text box which contains a HTML or XML file(loaded from server). After validating the file, I want to store that file where the user wishes to save(client), and the user must save in HTML or XML format only.
I had developed a code, but it automatically saves, without asking the user.</p>

<pre><code> protected void btnsave_Click(object sender, EventArgs e)
    {
        string getnote = txtdisplay.Text.Trim();
        String filepath = Server.MapPath(@"img\new1.txt");
        System.IO.FileStream ab = new System.IO.FileStream(filepath, System.IO.FileMode.Create);
        System.IO.StreamWriter Write101 = new System.IO.StreamWriter(ab);
        Write101.WriteLine(getnote);
        Write101.Close();
    }
</code></pre>

<p>Any help is appreciated</p>
