file download dialog coming twice

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



i am using following code in button click... of asp.net code behind page

Response.Clear() 'clears the current output content from the buffer

Response.AppendHeader("Content-Disposition", _

"attachment; filename=Add2Calendar.vbs")

Response.AppendHeader("Content-Length", mStream.Length.ToString())

Response.ContentType = "application/download"

Response.BinaryWrite(mStream.ToArray())

Response.End()





but file download dialog comes twice if i select open at first time..

any solution to this


.



Relevant Pages

  • Re: fseek and open_memstream
    ... so in effect it clears the buffer. ... Or else fclose() causes a null to get written at the current position. ... in some alphabets" - X3.4, ...
    (comp.lang.c)
  • Re: Pass an EOF before pressing enter
    ... The line buffer can become empty in at least three ways: ... By pressing Ctrl+d, which sends the contents of the line ... buffer without appending '\n' and clears the line buffer. ...
    (comp.lang.c)
  • Re: resetting ostringstream ?
    ... strclears the buffer and ... clearresets the stream's state. ... Jonathan ...
    (comp.lang.cpp)