I am using ASP.NET 2.0
I am using the following code for downloading the XML file. But the problem is that when I download the XML file it also consist on the all HTML of the .aspx page.
Dim sGenerateOutPutFilePath As String
Dim sFileWithPath As String
Dim sGenerateOutPutFileName As String
sGenerateOutPutFileName = "resultAccount.xml"
sGenerateOutPutFilePath = ConfigurationManager.AppSettings("FilePath")
sFileWithPath = sGenerateOutPutFilePath & sGenerateOutPutFileName
Try
'check file available or not
If File.Exists(sFileWithPath) = False Then
Dim i As Integer
i = 10
i = i + 1
Exit Sub
End If
Response.ContentType = "APPLICATION/OCTET-STREAM"
Dim disHeader As String = "Attachment; Filename=""" & sGenerateOutPutFileName & """"
Response.AppendHeader("Cont ...
Go to the complete details ...