Print Page | Close Window

Links disabled

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4266
Printed Date: 29 March 2026 at 9:21am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Links disabled
Posted By: mvargasp
Subject: Links disabled
Date Posted: 15 July 2003 at 2:18pm

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. It seems that the page gets an invalid state.

Does anybody know how can I solve it?

Thanks in advance.

God Bless.




Replies:
Posted By: Bunce
Date Posted: 16 July 2003 at 7:23am

You've changed the content type, so perhaps it needs to be changed back again?

However, I would have thought that the button to intiate the download would open up a new window to do the work for you , rather than affect the existing window...

Maybe it is posting back, and changing the content type then...  Perhaps remove the 'auto-postback' for that particular button?

Only guessing.. pretty hard to tell without seeing more of the code..

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net