Hi Dewright,
I think Bruce's suggestions are reasonable. As you mentioned that you'd
like to enforce the page to postback from clientside to server after the
serverside processing code finish, I'm not sure why don't you just let your
sequential code just execute after yoru former serverside code? Since let
the page return back to client and then postback will involve additional
round trip between client/server which has performance concerns.
In addition, if you do need to force a clientside postback(through code
behind serverside code), we can use the
Page.RegisterStartupScript method to register a postback script to
clietnside.
#Page.RegisterStartupScript Method
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebuipageclass
registerstartupscripttopic.asp?frame=true
For example, we can register the document.form1.submit() to force the page
submit it self.
IF you have any further particular requirement or questions, please feel
free to let us know.
Thanks & Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Bruce Barker" <
[email protected]>
| References: <
[email protected]>
<OWJ5SZ#
[email protected]>
<
[email protected]>
| Subject: Re: Command Based Postback?
| Date: Wed, 13 Jul 2005 17:01:28 -0700
| Lines: 62
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: rdcsd1.safeco.com 12.144.134.2
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:112075
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| the .net way of meta-refresh is meta-refresh. you could release your
dataset
| after the filewrite.
|
| not sure what you are trying to do, but probably you have a page, that
| downloads a file, which you want to refresh when the file download is
done.
|
| this is done by by starting the download in another window (using client
| script), then having the main page poll the backend for the download to
be
| complete (well close to done, as the backend only knows when the last
| buffer was sent, not when the client received it). you will not want to
use
| the writefile method, because you will need to turn buffering off, and
| update the status in the server (say in session or app object) after
every
| buffer write (say 2k buffers), so the polling page can see how far along
the
| download is.
|
| -- bruce (sqlwork.com)
|
|
| | > What I am doing is a Response.WriteFile that I can't have interupted.
| >
| > What option do I have in this manner as one this file has finished
| > downloading the page needs to refresh to release my dataset.
| >
| > There has to be a DotNet way of doing something like the meta-refresh.
| > --
| > D @ premierdata
| >
| >
| > "Bruce Barker" wrote:
| >
| >> you can't directly. your client code needs to poll the server in some
| >> fashion: iframe, xmlhttp or meta refresh. google this newsgroup for
| >> progress
| >> bar for hints.
| >>
| >> -- bruce (sqlwork.com)
| >>
| >>
message
| >> | >> >I need to be able to from C# launch a postback.
| >> >
| >> > I have a command button that launches a function, I also have a
| >> > javascript
| >> > function that then keeps you from firing any other objects on the
page,
| >> > but
| >> > when the function finishes the page needs to postback, but my
function
| >> > is
| >> > in
| >> > codebehind.
| >> >
| >> > What command do I need to call to say in my finnaly to postback my
| >> > page???
| >> > --
| >> > D @ premierdata
| >>
| >>
| >>
|
|
|