User248267340 postedUsing aspx, I learned how to prompt for a text file with FileUpload, and then modify the file contents on the server side, and then finally offer it for download.
However, the file that is downloaded includes the html from my Default.aspx.
Here's a snippet:
ModifyFileContents(myServerPath, WorkFile); // This modifies the file on the Server side
File.Delete(myServerPath);
string downfile = "~/" + updatedfilename; // Create virtual path -required for Response.TransmitFile
string arg1 = "Content-Disposition";
string arg2 = "attachment; filename=" + updatedfilename;
Response.ContentType = "text/plain";
Response.AppendHeader(arg1, arg2);
Response.TransmitFile(Server.MapPath(downfile));
Response.Flush();
File.Delete(WorkFile);
Can you see anything there that I'm missing?