postback question, is the order in which objects are rendered and returned controllable?

  • Thread starter Thread starter e
  • Start date Start date
E

e

I'm not really sure how to eloquently ask this, so I'll just demonstrate it.
Let's say I've got an aspx page, very pseudo for the sake of argument:

<%@ Page Codebehind="index.aspx.vb" [etc...] %>
<html>
<body>
<form>
<include:MyUserControl />
HTML, text, etc...
<asp:Label1 />
<asp:Label2 />
<asp:Textbox />
<asp:SubmitButton />
<asp:SpecialLabel />
</form>
</body>
</html>

On postback, some server-side stuff is going to happen that can generate a
LOT of HTML data - lots of rendered table web controls. This HTML data is
put into SpecialLabel.Text, and it can take a while to physically come
across the wire on dial-up (or even a lower-end DSL, if it's big enough).
That's ok, data is good; but unfortuantely the user is stuck with a blank IE
6 white-screen while the data comes across, and that's not too
professional-looking. I don't need anything too fancy, I just want to
somehow control postback in this order...

<html>
<body>
<form>
<MyRenderedUserControl>
<img>, text, blah blah, <img>, etc
<RenderedLabel1>
<RenderedLabel2>
<RenderedTextBox>
<RenderedButton>

....response.flush?

....so that it's visible on the client and then this section...

<RenderedSpecialLabel>
</form>
</body>
</html>

....response.flush?

So that my "page" is at least somewhat visible (and I could maybe display an
animated 'please wait' whirlygig) as all that table data is coming across.
The point is I don't want the user to just stare at a white screen the whole
time SpecialLabel is being sent to them, I'd rather they stare at the
originating page with a please wait message. Is that possible?
 
This seems to be giving me what I was looking for, in case anyone dreams up
doing something similar and finds this post:

<html>
<body>
<% Response.Buffer = True %>
<form>
<include:MyUserControl />
HTML, text, etc...
<asp:Label1 />
<asp:Label2 />
<asp:Textbox />
<asp:SubmitButton />
</form>
<% Response.Flush %>
<asp:SpecialLabel />
</body>
</html>
 
Back
Top