Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.
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
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!