473,320 Members | 1,900 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,320 software developers and data experts.

Changing the Content-Type "invalids" the page.

Hi all,

I have a web form which contains a frame, (a form
containing a menu on the left and a web form containing a
datagrid on the right). Also there is a button (right
side) which transforms the datagrid content in a CSV file
and forces the user to download the file. The following is
the code used to force a download:

'strCadena contains the datagrid info separated by commas,
as a CSV file
Response.ContentType = "application/octet-stream"
Response.AddHeader("content-
disposition", "attachment;filename=Reporte_InfoRed.csv")
Response.Write(strCadena)
Response.End()

After the user saves the file, the links on the menu on
the left side don't work and the buttons on the right side
promt an error on the client side. I think it's because of
the change of the Content-Type. When I click on a menu
link and then view the history of the browser, the "name"
for the last page visited is "No page to display".

Does anybody know if there is any other way to force a
download without changing the Content_Type?

Thanks in advance.

God Bless.
Jul 19 '05 #1
3 3141
Hello,

I am looking for somebody who could help you on it. Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "mvargasp" <ma*********@viabcp.com>
!Sender: "mvargasp" <ma*********@viabcp.com>
!Subject: Changing the Content-Type "invalids" the page.
!Date: Thu, 17 Jul 2003 09:19:11 -0700
!Lines: 30
!Message-ID: <00****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcNMfyg2/8gh8xWQSeSXwRLwOo8PKQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.general
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101543
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.general
!
!Hi all,
!
!I have a web form which contains a frame, (a form
!containing a menu on the left and a web form containing a
!datagrid on the right). Also there is a button (right
!side) which transforms the datagrid content in a CSV file
!and forces the user to download the file. The following is
!the code used to force a download:
!
!'strCadena contains the datagrid info separated by commas,
!as a CSV file
!Response.ContentType = "application/octet-stream"
!Response.AddHeader("content-
!disposition", "attachment;filename=Reporte_InfoRed.csv")
!Response.Write(strCadena)
!Response.End()
!
!After the user saves the file, the links on the menu on
!the left side don't work and the buttons on the right side
!promt an error on the client side. I think it's because of
!the change of the Content-Type. When I click on a menu
!link and then view the history of the browser, the "name"
!for the last page visited is "No page to display".
!
!Does anybody know if there is any other way to force a
!download without changing the Content_Type?
!
!Thanks in advance.
!
!God Bless.
!
Jul 19 '05 #2
Hello,

I am looking for somebody who could help you on it. Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "mvargasp" <ma*********@viabcp.com>
!Sender: "mvargasp" <ma*********@viabcp.com>
!Subject: Changing the Content-Type "invalids" the page.
!Date: Thu, 17 Jul 2003 09:19:11 -0700
!Lines: 30
!Message-ID: <00****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcNMfyg2/8gh8xWQSeSXwRLwOo8PKQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.general
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101543
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.general
!
!Hi all,
!
!I have a web form which contains a frame, (a form
!containing a menu on the left and a web form containing a
!datagrid on the right). Also there is a button (right
!side) which transforms the datagrid content in a CSV file
!and forces the user to download the file. The following is
!the code used to force a download:
!
!'strCadena contains the datagrid info separated by commas,
!as a CSV file
!Response.ContentType = "application/octet-stream"
!Response.AddHeader("content-
!disposition", "attachment;filename=Reporte_InfoRed.csv")
!Response.Write(strCadena)
!Response.End()
!
!After the user saves the file, the links on the menu on
!the left side don't work and the buttons on the right side
!promt an error on the client side. I think it's because of
!the change of the Content-Type. When I click on a menu
!link and then view the history of the browser, the "name"
!for the last page visited is "No page to display".
!
!Does anybody know if there is any other way to force a
!download without changing the Content_Type?
!
!Thanks in advance.
!
!God Bless.
!
Nov 22 '05 #3
Hello,

I am looking for somebody who could help you on it. Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "mvargasp" <ma*********@viabcp.com>
!Sender: "mvargasp" <ma*********@viabcp.com>
!Subject: Changing the Content-Type "invalids" the page.
!Date: Thu, 17 Jul 2003 09:19:11 -0700
!Lines: 30
!Message-ID: <00****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcNMfyg2/8gh8xWQSeSXwRLwOo8PKQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.general
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101543
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.general
!
!Hi all,
!
!I have a web form which contains a frame, (a form
!containing a menu on the left and a web form containing a
!datagrid on the right). Also there is a button (right
!side) which transforms the datagrid content in a CSV file
!and forces the user to download the file. The following is
!the code used to force a download:
!
!'strCadena contains the datagrid info separated by commas,
!as a CSV file
!Response.ContentType = "application/octet-stream"
!Response.AddHeader("content-
!disposition", "attachment;filename=Reporte_InfoRed.csv")
!Response.Write(strCadena)
!Response.End()
!
!After the user saves the file, the links on the menu on
!the left side don't work and the buttons on the right side
!promt an error on the client side. I think it's because of
!the change of the Content-Type. When I click on a menu
!link and then view the history of the browser, the "name"
!for the last page visited is "No page to display".
!
!Does anybody know if there is any other way to force a
!download without changing the Content_Type?
!
!Thanks in advance.
!
!God Bless.
!
Nov 22 '05 #4

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

Similar topics

0
by: Hal Vaughan | last post by:
Is there any way to run a Perl script from a web page without changing the web page? I'd like to be able to click a button on a web page and have it run a script in the background, but not have...
3
by: Ron Brennan | last post by:
Good morning. I have a page displayed and want to get information from a user using showModalDialog, and then send a request to the server for more information based on the user info from the...
2
by: brian | last post by:
I am new to .net technology. I have a home page built for my company using asp.net. On the bottom of the home page I want to embed a "dilbert comic strip" which is gif format. I have the strips...
1
by: Richard Y | last post by:
I've written a custom class that inherits from System.Web.UI.Page, and I'd like VS.NET 2003 to use it as the default class in my codebehind pages. I didn't see any way to set this in the GUI. I did...
1
by: Anup | last post by:
Hi group, I m using protected System.Web.UI.WebControls.DataGrid (ASP.NET 1.x) I have set the "pager style mode" to "NumericPages" with "AllowingPaging=true"
2
by: gralexp | last post by:
Hi Guys. I have a problem, and for some reason I have not been able to find an answer on the net. In a nutshell, I have some codes on my page, which I want to change to an appropriate string...
2
by: paul.gibson | last post by:
I have a released web app where I have found a bug that can be fixed simply by moving a JavaScript <scriptblock from the bottom of an ASPX page to the top. Is it a safe/accepted practice to...
4
by: JB | last post by:
I have found where I can change the page that is displayed for 404 in IIS. Question is - can I use an aspx page? I want to have the page send me an e-mail of the URL of the page they are trying to...
0
by: jaim | last post by:
In my web page there is a text 2nd number of your passcode when the page loaded , dynamicaaly each time number is getting changed. And also having the Combo box to select the values (0-9) this should...
3
by: Megan Bade | last post by:
Hello all! I am editing an existing web site for a customer and have NO CLUE as to why the once centered index page is now justified left. I had to edit some text on the page and is also on all pages...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.