Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 [HELP] Auto Save Default Folder

Author  Topic 

knockyo
Yak Posting Veteran

83 Posts

Posted - 2014-02-14 : 21:07:22
Hi All,

I wishes to auto save my attachment file into a defaul folder named "D:\Output" and my code below always prompt me manual save.

I need your expertise experience and help me to enhance the code below,

Dim context As HttpContext = HttpContext.Current
context.Response.Clear()
context.Response.ClearHeaders()
context.Response.ClearContent()
context.Response.Cache.SetCacheability(HttpCacheability.NoCache)
context.Response.ContentType = "text/csv"
context.Response.AddHeader("Content-Disposition", "attachment; filename=Partner.csv")
context.Response.Charset = Encoding.UTF8.WebName
context.Response.ContentEncoding = Encoding.UTF8
context.Response.BinaryWrite(Encoding.UTF8.GetPreamble)
context.Response.Write(ExportToCSVFile(dtResult))
context.ApplicationInstance.CompleteRequest()


If I want to auto save into virtual directory, can I have your help to comment my code above so that I can auto save into specific folder path.

Many thanks :)
   

- Advertisement -