473,396 Members | 2,009 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,396 software developers and data experts.

Correct coding in IE Download window form

2
Hello

There is a possibility to show DownloadFile form in web browser using following peace of code
Code: ( text )

HttpContext context = HttpContext.Current;
context.Response.ContentType = "application/octet-stream";
context.Response.AddHeader("Content-Disposition","attachment; filename=\"" + fileName + "\"");


but there is somenthing missing because when I use filename with "#" it's displayed in wrong way as "_" in IE 7.0 (in firefox is OK). You have a choice in this window to save and to open the file. When you want to save -> filename will be wrong, when you choose to open filename in eg. word filename shown at the top of the window of word will be ok.

So I used ascii code of # then it save correct filename but when I choose to open it in word it filename has ascii codes.

I assume that I should give correct coding type somewhere in this peace of code ... but I don't know where. Can you help me ?
Aug 23 '07 #1
0 1004

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Programatix | last post by:
Hi, I'm working on a project which includes XML WebServices and Windows Form application. The Windows Form application will call the XML WebServices to retrieve data from database. The data...
0
by: ajaykrishna | last post by:
Hi I'm using ASP.NET for my application. In one of the place, I am downloading data to excel document. But, here the File Download window is opening twice in some systems and some system opens it...
4
by: gb | last post by:
hi, i placed System.Windows.Forms.WebBrowser in my WinForm. When i tried loading word document, it opens the File Download window. My question is how can i avoid the File Download window from...
1
by: Kueishiong Tu | last post by:
I have a .net window form application but I have to get data from various web sites. How do I make Http request (preferrably via post method) from a window form to get the data from those web...
2
by: david | last post by:
I have written the Web Services in VBaic .Net. One function interface: DataSet GetAllPatients() which will be called in remote client and return DataSet. I have written the clients by using both...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
2
by: Melisa | last post by:
Hi, How can i create bitmap of a window form with all its child controls without showing this form? 1. I am trying to create bitmap image of a window form. 2. I am creating a new instance of...
0
by: Darqer | last post by:
Hello There is a possibility to show DownloadFile form in web browser using following peace of code HttpContext context = HttpContext.Current; context.Response.ContentType =...
4
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
All, I present some data on the window form, then I try to save window form as file on the local C drive, like save word file, can anyone know how? Thanks, Martin
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.