Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
Public Shared Sub saveToHardDrive(filename As String, Response As HttpResponse, _ textToWriteToFile As String, fileExtension As String) 'response to prompt user to save. Response.ClearContent() Response.ContentType = "text/plain" 'replace spaces with %20, prevents IE replacing with _ underscores If HttpContext.Current.Request.UserAgent.Contains("MSIE 7.0") Then filename = filename.Replace(" ", "%20") End If 'add XML to filename If Not filename.EndsWith(fileExtension) Then filename += fileExtension End If Response.AddHeader("Content-disposition", "attachment;filename=""" + filename + """") Response.Write(textToWriteToFile) Response.BufferOutput = True Response.Flush() Response.Close() End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.