Re: Problem with postback after Response.Write
From: Russ (russk2_at_eticomm.net)
Date: 10/07/04
- Next message: nicholas: "Re: define style *** with data drom dbase"
- Previous message: ESPN Lover: "Re: Show pictures in database on Webform"
- In reply to: Patrice: "Re: Problem with postback after Response.Write"
- Next in thread: Patrice: "Re: Problem with postback after Response.Write"
- Reply: Patrice: "Re: Problem with postback after Response.Write"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 07 Oct 2004 13:14:24 -0400
On Thu, 7 Oct 2004 11:38:54 +0200, "Patrice" <nobody@nowhere.com>
wrote:
>What do you mean by "posting back" ?
Well, I believe I have the terminology right, but maybe not. Im my
mind, postback is when a runat=server control is used. The browser
connects to the server - the server executes some code and generates a
new copy of the web page (or possibly transfers control to a different
page), and sends the changed page back to the browser which displays
it. So the posting back is two steps - the browser posts back to the
server and then the server posts back to the browser. In my case, the
problem seems to be that there seems to be no way to post back to the
server after the download dialog has completed.
>My understanding is that you want to stream a file in response to a request.
>As you send a file, you have to send only the file content, no more, no
>less. Though you can still perform some code after sending the file,
>response.redirect would write an additonnal header to the response. The
>supplemental header suggested by someone else could work as it is to be
>written before.
It didn't work. The problem is that I am not really downloading a
file. The data being written to the file is assembled 'on the fly' by
the server and sent to the browser via the Response.Write calls. The
browser allows the user to save the data as a file and then an ActiveX
control is supposed to be run. (The Activex control parses the file
and sends the various sections of it to the printer as separate
reports.) This should be as transparent to the user as possible. It
is asking a lot of the user to have to click the button that says
"print these reports", then go though the download dialog to save a
file, and then click another button to say "now REALLY print them".
My alternative is to make the button that says "print these reports"
instead say "download these reports". Then supply a separate button
to say "print the downloaded reports". That would not be so bad, but
I would want the 'print' button to be disabled until after the
download is complete. (Otherwise the user could click the print
button before the file was downloaded, and might print some reports
from the last time instead of what he wanted.) Since I cannot get
control after the download is complete, there is also no way to enable
the print button - unless you or someone comes up with a magic bullet
that will do this.
>...Note that performing some code server side is not the problme. The problem
>is that you want to display something to the user once the download is
>completed...
That's exactly right. This is a Web Business application and the same
rules that apply for casual web browsing do not work too well.
Microsoft has been touting ASP.NET applications for business use, but
it seems like a lot of needed functionality is either missing or hard
to find. I've been thinking about trying the new version but someone
said it would not be ready for production use for another year and I
cannot wait that long. Hopefully there exists work-arounds for some
of the issues I am facing.
Thanks for all your help.
Regards, Russ
>
>Patrice
- Next message: nicholas: "Re: define style *** with data drom dbase"
- Previous message: ESPN Lover: "Re: Show pictures in database on Webform"
- In reply to: Patrice: "Re: Problem with postback after Response.Write"
- Next in thread: Patrice: "Re: Problem with postback after Response.Write"
- Reply: Patrice: "Re: Problem with postback after Response.Write"
- Messages sorted by: [ date ] [ thread ]