A
Anonymous Poster
hi,
I'm having a serious issue with the VS 2003 / 1.1 framework and attachments.
If I try to prompt to open/save a file with the following
public void WriteBinaryResponse(HttpResponse aResponse, string aContentType,
byte[] aData, string aDefaultFileName)
{
aResponse.ClearContent();
if (aDefaultFileName != null)
aResponse.AppendHeader("Content-Disposition","attachment;filename=\""+aDefaultFileName+"\"");
aResponse.AppendHeader("Content-Length", aData.Length.ToString());
aResponse.ContentType = aContentType;
aResponse.BinaryWrite(aData);
aResponse.Flush();
aResponse.Close();
}
then on next PostBack, a new Session is created! Can't find any solutions on
google etc. Also (randomly) selecting 'open' comes up with 'file not
found'. I read that this can sometimes happen due to caching, but I'm not
setting any cachability on the page...
TIA
Simon
I'm having a serious issue with the VS 2003 / 1.1 framework and attachments.
If I try to prompt to open/save a file with the following
public void WriteBinaryResponse(HttpResponse aResponse, string aContentType,
byte[] aData, string aDefaultFileName)
{
aResponse.ClearContent();
if (aDefaultFileName != null)
aResponse.AppendHeader("Content-Disposition","attachment;filename=\""+aDefaultFileName+"\"");
aResponse.AppendHeader("Content-Length", aData.Length.ToString());
aResponse.ContentType = aContentType;
aResponse.BinaryWrite(aData);
aResponse.Flush();
aResponse.Close();
}
then on next PostBack, a new Session is created! Can't find any solutions on
google etc. Also (randomly) selecting 'open' comes up with 'file not
found'. I read that this can sometimes happen due to caching, but I'm not
setting any cachability on the page...
TIA
Simon