473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ASP.Net Page lifeycle and threads

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
Nov 18 '05 #1
1 856
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

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Pinfold" <an*******@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Larry Woods | last post by:
I have a server page that has served an HTML page with a "Cancel" button on it, BUT this server page has not completed and is running a 15-30 second process before it completes. I want the browser...
2
by: Dave Kirby | last post by:
I am working on a network management program written in python that has multiple threads (typically 20+) spawning subprocesses which are used to communicate with other systems on the network. This...
2
by: Johann Blake | last post by:
The following is a bug I have discovered using tab pages and threads and I am looking for a workaround. Create a new Windows Forms application and add a tab control with two tab pages. Add a...
9
by: Bruce W.1 | last post by:
When a user clicks on a button on my aspx page it launches a bunch of threads which go and do things which might take a few seconds each. Rather than waiting for all threads to complete before...
4
by: Jeremy Holt | last post by:
Hi, In a windows.forms application I would BeginInvoke a delegate on the UI thread to collect data from a database. When the call returns to the AsyncCallback, if the Control.InvokeRequired =...
1
by: Nikolay Petrov | last post by:
Can I use threads ih ASP.NET page? I one to run a long operation in separate thread and from it to update a control in aps page to display status information. Is this possible? My first guess is...
2
by: Amil | last post by:
I have a few web pages that do file crunching; I want to make sure these pages...only these pages, run at a lower priority. I'm not sure of how the threading architecture of ASP.NET works, but is...
22
by: Christopher Nelson | last post by:
I have a little menu system which essentially takes HTML like: <div id='foo'></div> and retrieves foo.shtml from the server and inserts it inside the <div>. But sometimes I'd like foo.shtml...
39
by: cj | last post by:
I have a 2005 TCP/IP server that creates a new thread to handle each incoming TCP/IP request. Once the request has been answered by the thread the TCP/IP socket is disconnected and the sub/thread...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.