ASP.Net Page lifeycle and threads

G

Guest

Hi
I have a problem with updating a control ( a simple label ) with a value that is returned from an asynchronous call in an ASP.Net page. Basically my page loads, I call a method asynchronously, get a result back and try to put it on my form.

The value never appeares on my form, even though I know the control ( label ) has the value. I had assumed it had something to do with the fact that the async call was on a different thread, or that perhaps the page needed refreshed from the client side

Can anyone suggest a reason for ths issue and potential solution

Thanks
 
A

Alvin Bruney [MVP]

by the time you have the result, the page has already left the server bound
for the client. you will need to cause the page execution to wait for the
async result before posting to the client or refresh the page so it can pick
up the value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top