473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

File name is displayed Garbled in "File download dialog box"

Hello,

The problem I'm facing is that the file name that is displayed in File
download diaglog of web page displays garbled.

The file name is japanese. English names works fine.
Dim myFilePathDetach() As String = Split(Request.QueryString("link"), "/")
Dim myFilePath As String =
System.Configuration.ConfigurationManager.AppSetti ngs("UploadFolder").ToString & "\" & myFilePathDetach(1).ToString
Dim myFileInfo As New FileInfo(myFilePath)

HttpContext.Current.Response.ClearContent()
httpContext.Current.Response.ClearHeaders()

'Response.ContentType = "application/pdf"
HttpContext.Current.Response.AppendHeader("content-type",
"application/pdf")
HttpContext.Current.Response.AppendHeader("content-disposition",
"attachment;filename=" & myFileInfo.Name)
HttpContext.Current.Response.AppendHeader("content-length",
myFileInfo.Length)
Response.WriteFile(myFilePath)

response.end()

Any help would be great use.

Thanks,

Aug 12 '06 #1
0 1309

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Luis Ferrao | last post by:
Hi, My Windows Forms application uses the WebBrowser control to open an Excel file since OLE objects are gone in .Net. The application is actualy a clone of the one found in the MS Knowledge...
1
by: Jesper Hermansen | last post by:
Hi! I'm making a system that will generate Winamp-playlists. To make it easy for the user to add a file to the list, I'm using <input type="file">. The problem with this is that I only get...
1
by: Brian Takita | last post by:
Hello, Whenever I add an existing aspx/ascx file to the project, a dialog box saying "There is no class file in the project associaated with the Web Form 'blah.ascx'. Create a new class file...
13
by: Mark Kamoski | last post by:
Hi Everyone-- How can one to make a "select directory name" dialog? It would be great if one could use the FileOpenDialog but it does not seem to be straight-forward. Anyway, if you have...
9
by: Prakash Singh Bhakuni | last post by:
am replacing the default "Browse..." button for input type=file. This works fine except that the form will only submit after the SUBMIT button is clicked twice. Any ideas on why this is happening...
4
by: L. Scott M. | last post by:
I am invoking a file download using the following code: Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadFile.Name);...
7
by: Tim Slattery | last post by:
I'm trying to handle the onChange event in an <input type="file"> element. In IE, there's no problem: the event fires when a file in the "open" box is doubleclicked, or the "Open" button in the box...
2
by: nedu | last post by:
Hi, Since I need to insert a a excel file in the HTML, I used <iframe> tag. But this tag PROMPT me the "File Download" dialog box every time the page got refreshed. Is there any ASP code to block...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.