Author: justinmichaels | Posted on: 6/17/2008 1:57:51 PM | Views : 396

The problem I have run in to is I have a grid that I need to export it's data to either a text file or csv file.  So I give the user the ability by selecting a radio button for either a .csv file representation of my grid or a .txt representation of my grid.  These files are being built in memory by convert the data to a byte array.

The first response will working great but then any response sent after that will hang for atleast a minute and sometimes show another save dialog or just not show a save dialog at all.  I am very new to using the response object in order to send files.

 fileData = base.StringArrayToByteArray(sRowData);
Response.Clear();
Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName);
Response.ContentType = contentType;
Response.BinaryWrite(fileData);
Response.End(); I have read that a way to get around this is by launching a new popup win ...

Go to the complete details ...