Response.WriteFile not firing EndRequest event

lechuck7

New Member
The page I'm working on has existing loading message logic using PageRequestManager's beginRequest and endRequest. I'm adding a popup that allows the user to download a file using Response.BinaryWrite. The loading message binding...\[code\]Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(ShowLoadingMessage);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(HideLoadingMessage);\[/code\]My Response code...\[code\]Dim bytes() As Byte = System.Text.Encoding.ASCII.GetBytes(strFileBody)Response.AddHeader("Content-disposition", "attachment;filename=" & strFileName & ".txt")Response.ContentType = "text/plain"Response.BinaryWrite(bytes)Response.End()\[/code\]My guess is that I need to either bind the HideLoadingMessage javascript event to some event called at the end of the response (that isn't fired as 'endRequest') manually or to manually call the endRequest event somehow.
 
Back
Top