Re: frustration with events firing
From: Hermit Dave (hermitd.REMOVE_at_CAPS.AND.DOTS.hotmail.com)
Date: 09/10/04
- Next message: Kevin Spencer: "Re: DataView vs DataReader"
- Previous message: Hermit Dave: "Re: ViewState Question"
- In reply to: Rob: "frustration with events firing"
- Next in thread: Kevin Spencer: "Re: frustration with events firing"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 20:36:12 +0100
you are sending the file to the user and you need to finish the current
request before the client can make another request. in this case user
Response.Redirect (it executes from client browser) and since the client is
still not done with the last request.. nothing will happen.
-- Regards, Hermit Dave (http://hdave.blogspot.com) "Rob" <fiddler27@att.net> wrote in message news:540e4d0b.0409101129.6746daeb@posting.google.com... > ok, so im ready to absolutely throw my self right into the monitor, > can anyone explain why certain events fire before others in asp.net? > in my case, after some processing a final download aspx page calls a > download function which writes a file to the browser.. yet after that > is done I want the page to redirect to another page, but no matter > what I try it wont redirect, I know there is something with the way > .net works, I just cant figure it out. > > here is simplified version of code > > process.... > call downloadfile > > Sub downloadfile (fullfile as string) > Dim fstream As FileStream = File.Open(fullfile, > FileMode.Open) > Dim fsize As Long = fstream.Length > Dim Buffer(CInt(fsize)) As Byte > fstream.Read(Buffer, 0, CInt(fsize)) > fstream.Close() > Response.AddHeader("content-disposition", "attachment; > filename=" + filename) > Response.BinaryWrite(Buffer) > Response.Redirect("main.aspx")<--- this does not fire at > all? > end sub > > after the open/save window comes up , the redirect never fires.. > thoughts appreciated.
- Next message: Kevin Spencer: "Re: DataView vs DataReader"
- Previous message: Hermit Dave: "Re: ViewState Question"
- In reply to: Rob: "frustration with events firing"
- Next in thread: Kevin Spencer: "Re: frustration with events firing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|