469,626 Members | 1,538 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

aspx is not updated when web service is running

I'm calling a web service from my aspx and I want my page to update with the
AsyncResult.IsCompleted property. The web service runs well, but my page is
not updated. The textbox should be updated everytime it checks to see if the
call was completed. It's only updated at the end. Here's my code:

protected void btn_process_Click(object sender, EventArgs e)
int iCount = 0;
localhost.Service obj = new localhost.Service();
AsyncCallback cb = new AsyncCallback(asciiFileCheckCallback);
IAsyncResult ar = obj.BeginAsciiFileCheck(txt_file.Text, cb, obj);
while (!ar.IsCompleted)
this.txt_counter.Text = iCount.ToString(); //The textbox
remains empty.
private void asciiFileCheckCallback(IAsyncResult ar)
localhost.Service obj = (localhost.Service)ar.AsyncState;

Any help is appreciated. If there's a better way of letting the user know
that the service is running, please let me know. I've seen some sites
(specially the travel sites) that display an intermediary page while their
process is running. Is that difficult to implement?

May 8 '06 #1
0 806

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tim Wallace | last post: by
reply views Thread by Tony Lewis | last post: by
5 posts views Thread by Silvia | last post: by
1 post views Thread by Jim Bayers | last post: by
3 posts views Thread by Carl Johansen | last post: by
reply views Thread by =?Utf-8?B?bmVlcmFqYkBub2lkYS5ub3NwYW1oY2x0ZWNoLmNv | last post: by
2 posts views Thread by =?Utf-8?B?TWlrZQ==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.