The answer will depend on whether, as Forgotten Semicolon mentions, you need repeated downloads or once-and-done throwaways.
Either way, the key will be to set the content-type of the output to ensure that a download window is displayed. The problem with straight text output is that the browser will attempt to display the data in its own window.
The core way to set the content type would be something similar to the following, assuming that text is the output string and filename is the default name you want the file to be saved (locally) as.
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ContentType = "application/octet-stream";
response.Charset = "";
response.AddHeader("Content-Disposition", String.Format("attachment; filename=\"{0}\"", filename));
response.Flush();
response.Write(text);
response.End();
This will prompt a download for the user.
Now it gets trickier if you need to literally save the file on your web server -- but not terribly so. There you'd want to write out the text to your text file using the classes in System.IO. Ensure that the path you write to is writable by the Network Service, IUSR_MachineName and ASPNET Windows users. Otherwise, same deal -- use content type and headers to ensure download.
I'd recommend not literally saving the file unless you need to -- and even then, the technique of doing so directly on the server may not be the right idea. (EG, what if you need access control for downloading said file? Now you'd have to do that outside your app root, which may or may not even be possible depending on your hosting environment.)
So without knowing whether you're in a one-off or file-must-really-save mode, and without knowing security implications (which you'll probably need to work out yourself if you really need server-side saves), that's about the best I can give you.