P
prakash.kgm
Dear Friends,
I am using the following code to initiate a download in the client
side.
--------------------------
Aspx Page Name : WebForm2.aspx
fileStream =
File.Open("e:\à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜçÇà+â¦éÉè+ê-ë+î+ï+-à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜ-data.txt",
IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.Read)
ReDim bytDocument(fileStream.Length)
fileStream.Read(bytDocument, 0, fileStream.Length)
fileStream.Close()
Dim realName As String =
"à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜçÇà+â¦éÉè+ê-ë+î+ï+-à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜ-data.txt"
Dim myname As String = System.Web.HttpUtility.UrlEncode(realName)
' If I did not used UrlEncode IE changes the characters to unkown chars
Response.AddHeader("content-disposition", "attachment; filename=" &
myname)
Response.AddHeader("Content-Length", bytDocument.Length.ToString())
Response.ContentType = "application/x-unknown"
'Response.ContentType = "application/zip"
Response.BinaryWrite(bytDocument)
Response.Flush()
Response.Close()
Response.End()
------------------------------------------------------------------------------------
My file name contains the characters other than english.
When I call the page from IE The "File Download" dialog apperas without
any problem. but the file name is changed to "WebForm2.html" .
But if the file name is "à+â¦éÉè+ê-ë+î+ï.txt" {Smaller than
the previous one} working without any problems The file download dialog
appers with the name "à+â¦éÉè+ê-ë+î+ï.txt".
I have not got any problems in firefox browser.
Is anything I am doing wrong?
Regards
Prakash
I am using the following code to initiate a download in the client
side.
--------------------------
Aspx Page Name : WebForm2.aspx
fileStream =
File.Open("e:\à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜçÇà+â¦éÉè+ê-ë+î+ï+-à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜ-data.txt",
IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.Read)
ReDim bytDocument(fileStream.Length)
fileStream.Read(bytDocument, 0, fileStream.Length)
fileStream.Close()
Dim realName As String =
"à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜçÇà+â¦éÉè+ê-ë+î+ï+-à+â¦éÉè+ê-ë+î+ï+ôGùdûOüÜ-data.txt"
Dim myname As String = System.Web.HttpUtility.UrlEncode(realName)
' If I did not used UrlEncode IE changes the characters to unkown chars
Response.AddHeader("content-disposition", "attachment; filename=" &
myname)
Response.AddHeader("Content-Length", bytDocument.Length.ToString())
Response.ContentType = "application/x-unknown"
'Response.ContentType = "application/zip"
Response.BinaryWrite(bytDocument)
Response.Flush()
Response.Close()
Response.End()
------------------------------------------------------------------------------------
My file name contains the characters other than english.
When I call the page from IE The "File Download" dialog apperas without
any problem. but the file name is changed to "WebForm2.html" .
But if the file name is "à+â¦éÉè+ê-ë+î+ï.txt" {Smaller than
the previous one} working without any problems The file download dialog
appers with the name "à+â¦éÉè+ê-ë+î+ï.txt".
I have not got any problems in firefox browser.
Is anything I am doing wrong?
Regards
Prakash