In my application i have to save the result in the form of a text file in a folder.My code is
using (HttpWebResponse result = (HttpWebResponse)request.GetResponse())
{
using (Stream stream = result.GetResponseStream())
{
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", String.Format("attachment; filename=\"{0}\"", "result." + GetExtension(exportFormat)));
var length = copyStream(stream, Response.OutputStream);
Response.AddHeader("Content-Length", length.ToString());
}
}
When this code is executed a dialog box is shown which has save and cancel options in it.
But the problem is that i have to save the result in a specific folder in the form of text file (which is obtained from this code in dialog) without showing the dialog box.