473,888 Members | 1,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE modifying filename specified in content type response

I've got an page used for downloads that acts similarily to the MSFT
downloads.... page displays and refreshes itself which causes a XML file to
be streamed to the client.

The streaming of the file is working fine, however, IE is mucking the the
filename I specify. For example, I'm specifying the filename
"Product.Licens e.lic", but IE displays "Product[1].License.lic". See code
below... ideas?

Response.Conten tType = "text/xml";
Response.AddHea der("content-disposition",
"attachment;fil ename=Product.L icense.lic");
Response.Binary Write(buffer);
Response.End();

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

May 3 '06 #1
7 1603
Product.License .lic already exists ???
Is that why it is adding Product[1].License.lic
does it add Product[2].License.lic?

SA
"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:65******** *************** ***********@mic rosoft.com...
I've got an page used for downloads that acts similarily to the MSFT
downloads.... page displays and refreshes itself which causes a XML file
to
be streamed to the client.

The streaming of the file is working fine, however, IE is mucking the the
filename I specify. For example, I'm specifying the filename
"Product.Licens e.lic", but IE displays "Product[1].License.lic". See code
below... ideas?

Response.Conten tType = "text/xml";
Response.AddHea der("content-disposition",
"attachment;fil ename=Product.L icense.lic");
Response.Binary Write(buffer);
Response.End();

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

May 3 '06 #2
It will exist on the user's PC... but the prompt is within the
OPEN/SAVE/CANCEL dialog... before you even pick a target for the install.

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

"MSDN" wrote:
Product.License .lic already exists ???
Is that why it is adding Product[1].License.lic
does it add Product[2].License.lic?

SA
"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:65******** *************** ***********@mic rosoft.com...
I've got an page used for downloads that acts similarily to the MSFT
downloads.... page displays and refreshes itself which causes a XML file
to
be streamed to the client.

The streaming of the file is working fine, however, IE is mucking the the
filename I specify. For example, I'm specifying the filename
"Product.Licens e.lic", but IE displays "Product[1].License.lic". See code
below... ideas?

Response.Conten tType = "text/xml";
Response.AddHea der("content-disposition",
"attachment;fil ename=Product.L icense.lic");
Response.Binary Write(buffer);
Response.End();

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp


May 3 '06 #3
good enough and if it does not exist then you still get
Product[1].License.lic even for the first time.

Does the name Product a reserved word.

What happens if you just, for testing only, use Product.lic or
Product.License what happens?

SA

"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:07******** *************** ***********@mic rosoft.com...
It will exist on the user's PC... but the prompt is within the
OPEN/SAVE/CANCEL dialog... before you even pick a target for the install.

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

"MSDN" wrote:
Product.License .lic already exists ???
Is that why it is adding Product[1].License.lic
does it add Product[2].License.lic?

SA
"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:65******** *************** ***********@mic rosoft.com...
> I've got an page used for downloads that acts similarily to the MSFT
> downloads.... page displays and refreshes itself which causes a XML
> file
> to
> be streamed to the client.
>
> The streaming of the file is working fine, however, IE is mucking the
> the
> filename I specify. For example, I'm specifying the filename
> "Product.Licens e.lic", but IE displays "Product[1].License.lic". See
> code
> below... ideas?
>
> Response.Conten tType = "text/xml";
> Response.AddHea der("content-disposition",
> "attachment;fil ename=Product.L icense.lic");
> Response.Binary Write(buffer);
> Response.End();
>
> --
> -AC [MVP MCMS]
> http://www.andrewconnell.com
> http://www.andrewconnell.com/mvp
>


May 3 '06 #4
Same result.

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

"MSDN" wrote:
good enough and if it does not exist then you still get
Product[1].License.lic even for the first time.

Does the name Product a reserved word.

What happens if you just, for testing only, use Product.lic or
Product.License what happens?

SA

"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:07******** *************** ***********@mic rosoft.com...
It will exist on the user's PC... but the prompt is within the
OPEN/SAVE/CANCEL dialog... before you even pick a target for the install.

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

"MSDN" wrote:
Product.License .lic already exists ???
Is that why it is adding Product[1].License.lic
does it add Product[2].License.lic?

SA
"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:65******** *************** ***********@mic rosoft.com...
> I've got an page used for downloads that acts similarily to the MSFT
> downloads.... page displays and refreshes itself which causes a XML
> file
> to
> be streamed to the client.
>
> The streaming of the file is working fine, however, IE is mucking the
> the
> filename I specify. For example, I'm specifying the filename
> "Product.Licens e.lic", but IE displays "Product[1].License.lic". See
> code
> below... ideas?
>
> Response.Conten tType = "text/xml";
> Response.AddHea der("content-disposition",
> "attachment;fil ename=Product.L icense.lic");
> Response.Binary Write(buffer);
> Response.End();
>
> --
> -AC [MVP MCMS]
> http://www.andrewconnell.com
> http://www.andrewconnell.com/mvp
>


May 3 '06 #5
I tried your code:

When I use just Product.lic I get "Product.li c" < Correct
When I use just Product.License I get "Product.Licens e" < Correct
When I use Product.License .lic I get Product[1].License.lic

So not the same thing happens.

SA
"MSDN" <sq**********@h otmail.com> wrote in message
news:u6******** ******@TK2MSFTN GP04.phx.gbl...
Product.License .lic already exists ???
Is that why it is adding Product[1].License.lic
does it add Product[2].License.lic?

SA
"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:65******** *************** ***********@mic rosoft.com...
I've got an page used for downloads that acts similarily to the MSFT
downloads.... page displays and refreshes itself which causes a XML file
to
be streamed to the client.

The streaming of the file is working fine, however, IE is mucking the the
filename I specify. For example, I'm specifying the filename
"Product.Licens e.lic", but IE displays "Product[1].License.lic". See code
below... ideas?

Response.Conten tType = "text/xml";
Response.AddHea der("content-disposition",
"attachment;fil ename=Product.L icense.lic");
Response.Binary Write(buffer);
Response.End();

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp


May 3 '06 #6
Yes, different result. The more research I do, the more it sounds like this
is something handled by the browser... and not something we have control
over. Oh well.

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

"MSDN" wrote:
I tried your code:

When I use just Product.lic I get "Product.li c" < Correct
When I use just Product.License I get "Product.Licens e" < Correct
When I use Product.License .lic I get Product[1].License.lic

So not the same thing happens.

SA
"MSDN" <sq**********@h otmail.com> wrote in message
news:u6******** ******@TK2MSFTN GP04.phx.gbl...
Product.License .lic already exists ???
Is that why it is adding Product[1].License.lic
does it add Product[2].License.lic?

SA
"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:65******** *************** ***********@mic rosoft.com...
I've got an page used for downloads that acts similarily to the MSFT
downloads.... page displays and refreshes itself which causes a XML file
to
be streamed to the client.

The streaming of the file is working fine, however, IE is mucking the the
filename I specify. For example, I'm specifying the filename
"Product.Licens e.lic", but IE displays "Product[1].License.lic". See code
below... ideas?

Response.Conten tType = "text/xml";
Response.AddHea der("content-disposition",
"attachment;fil ename=Product.L icense.lic");
Response.Binary Write(buffer);
Response.End();

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp



May 3 '06 #7
Oh well, may be send a zipped file that expands to Product.License .lic

"AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
news:40******** *************** ***********@mic rosoft.com...
Yes, different result. The more research I do, the more it sounds like
this
is something handled by the browser... and not something we have control
over. Oh well.

--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp

"MSDN" wrote:
I tried your code:

When I use just Product.lic I get "Product.li c" < Correct
When I use just Product.License I get "Product.Licens e" < Correct
When I use Product.License .lic I get Product[1].License.lic

So not the same thing happens.

SA
"MSDN" <sq**********@h otmail.com> wrote in message
news:u6******** ******@TK2MSFTN GP04.phx.gbl...
> Product.License .lic already exists ???
> Is that why it is adding Product[1].License.lic
> does it add Product[2].License.lic?
>
> SA
>
>
> "AC [MVP MCMS]" <sw*********@gm ail.com> wrote in message
> news:65******** *************** ***********@mic rosoft.com...
>> I've got an page used for downloads that acts similarily to the MSFT
>> downloads.... page displays and refreshes itself which causes a XML
>> file
>> to
>> be streamed to the client.
>>
>> The streaming of the file is working fine, however, IE is mucking the
>> the
>> filename I specify. For example, I'm specifying the filename
>> "Product.Licens e.lic", but IE displays "Product[1].License.lic". See
>> code
>> below... ideas?
>>
>> Response.Conten tType = "text/xml";
>> Response.AddHea der("content-disposition",
>> "attachment;fil ename=Product.L icense.lic");
>> Response.Binary Write(buffer);
>> Response.End();
>>
>> --
>> -AC [MVP MCMS]
>> http://www.andrewconnell.com
>> http://www.andrewconnell.com/mvp
>>
>
>


May 3 '06 #8

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

Similar topics

2
2989
by: Kit Truong | last post by:
Hello, I have an asp page that produces output from a database. This allows a simple way for the user to save the data to a text file by going to File->Save as... The default save as options always defaults to a particular filename and the save as type is always html, therefore the user has to manually type a filename and choose Text File (*.txt) as the type.
5
3604
by: Ariel Dolan | last post by:
Can I use HtmlInputFile to only get the selected file name but not actually upload the file? Clicking the control's Browse button let's the user select a file. All I need is the HtmlInputFile Value property. However, any button clicked on the Html page results in uploading the selected file. Is there a way to avoid the actual uploading? Alternatively, is there any other way to let a user select a file name from his local disk?
3
270
by: zweng | last post by:
I checked a few sites on exporting data from asp.net to excel and most of them point to the same source a http://support.microsoft.com/default.aspx?scid=kb;EN-US;317719 with some modifications My code is in the block below. When I click save when the open/save message box pops up, the file is saved as the aspx page's name with .xls. However, when I open the file, the filename is the exact aspx page name with .aspx in MS Excel ...
4
16999
by: Todd Perkins | last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually rely on google. So I hope I have enough info contained. Thank you in advance for any help! Problem: I am getting this error when I try to pull up my edit page to display the current database information in the form, and then edit it on click:
1
2324
by: ad | last post by:
I use the code below to export the content of a data set to Excel, the code come form http://www.dotnetjohn.com/articles.aspx?articleid=36 But it always use the web form's name as the default name of excel. Can we specify a meaningful filename before exporting to EXCEL? ------------------------------------------------------------------------------------------- 'first let's clean up the response.object response.Clear()
6
2498
by: Henke | last post by:
I have a web application that is used to transfer files to and from a database. The files are streamed and stored in the database that is. From one page I can download the files to the client, by clicking on the filename. The confirm download popup (the one built-in in IE) is displayed and I can select either Save or Open. One the file name row the name of the file is displayed but all " " (spaces) are replaced with a "+"-sign. Does...
4
2313
by: Jed | last post by:
I have looked everywhere and cannot find a resolution for this. I have read several post on this forum that allude to similar issues but I have not found a solution. I am sending dynamic content to the browser to be opened in Excel. On some browsers including on the mac it works fine, but in other browsers it sets the filename to the script instead of to the name specified in the content-disposition. I am at my wits end. Here is a...
2
2349
by: tedqn | last post by:
I use the Stream method to serve certain file types to the user. If the type is pdf, it opens in the browser fine. My problem is with those that the browser doesn't have plug-ins such as ppt, word, etc. it prompts to choose Open/Save/Cancel and defaults the filename to the ASP page serving the content. ie. BinarySend.asp -> BinarySend.doc, BinarySend.ppt. If I use Response.AddHeader "content-disposition", "attachment;filename=" &...
0
2683
by: jinnareddy | last post by:
Hi, I'm unable to download a file that is having a 2-byte char in its name (e.g.テ) using force download option. Though, am able to download file names involving ASCII chars. I have tried URL encoding too, but with no success. Can someone provide details on how to handle the 2-byte char URLs and download the files? Appreciate your suggestions/help in resolving it. Here is my code:
0
9961
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11185
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10887
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7990
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5824
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4247
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3252
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.