Textfield not updating with SaveAs dialog
===

For some reason, when I show the SaveAs dialog, my Checksum box never gets updated.  However, if I comment out the Content-Disposition header code below then everything works fine.  Any ideas?


    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        checksumField.Text = String.Empty;

        FileInfo filename = this.CreateFileInfoFromInput();

        if (!filename.Exists)
        {
            tableField.Focus();
            tableField.BorderColor = System.Drawing.Color.Red;
            return;
        }

        this.SaveFile(filename);
        checksumField.Text = GetChecksum(filename);
    }

    private FileInfo CreateFileInfoFromInput()
    {
        /* blah */
        return new FileInfo(blah);
    }

    private string GetChecksum(FileInfo filename)
    {
        return "test";
    }

    private void SaveFile(FileInfo fileName)
    {
        // Clear old headers
        Response.Clear();
        Response.Buffer = false;

        // Set the ContentType and Headers
        Response.ContentType = "application/octet-stream";
        Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName.Name);  //  <<<---- FAILING RIGHT HERE
        Response.AppendHeader("Content-Length", fileName.Length.ToString(System.Globalization.CultureInfo.InvariantCulture));
        Response.AppendHeader("Connection", "Keep-Alive"); 

        // Send data
        Response.TransmitFile(fileName.FullName);
    }