![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm new to ASP.NET, so please forgive me if my questions are sometimes nonsensical. I've read a few articals and I think I've got down the idea of "user action on client -> postback -> server event raised and handled -> server renders page and sends it back to the client" - right? But what I want to do is, cause the control to be visibly updated, but not as a result of a user action, but as a result of something that happens on the server (e.g., asynchronious action has returned with data). Can my control somehow tell the server to render the page? Or is there another way to update control appearance? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
"Serendipity" <serendipity (AT) community (DOT) nospam> wrote in message news:A6CAFE9D-A727-437E-890F-855A9EAD12F7 (AT) microsoft (DOT) com... Hi, I'm new to ASP.NET, so please forgive me if my questions are sometimes nonsensical. I've read a few articals and I think I've got down the idea of "user action on client -> postback -> server event raised and handled -> server renders page and sends it back to the client" - right? But what I want to do is, cause the control to be visibly updated, but not as a result of a user action, but as a result of something that happens on the server (e.g., asynchronious action has returned with data). Can my control somehow tell the server to render the page? Or is there another way to update control appearance? The way you described it above it the way it works. You just left a piece out: "user action on client -> postback -> ASP.NET creates an instance of the page -> the page creates instances of its controls -> server event raised and handled -> server renders page and sends it back to the client - ASP.NET destroys the page and all controls on it" So, your control can't tell the server anything, because no instance of your control exists. In these situations, one usually has the client make an asynchronous request to the server. If you Google for "progress bar" and ASP.NET you'll find many articles on this. -- John Saunders [MVP] |
#5
| |||
| |||
|
|
Hi Almog, As for the "updating control ..." question you mentioned, I think it is a typical asynchronous server-side processing and update client case, as John has suggested, generally, you can let the server-side keep processing the task(in a background thread) and the page will return the client synchronously. After that, in client page, you can use script to constantly post to the server and query the processing status, if finished, post back the page and display final result. Here are some former thread in newsgroup and tech articles in MSDN library that discussing on similar topic: http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/brow se_thread/thread/44302efa18ea9567/1619ca7b4000d2f8 #Reporting Task Progress With ASP.NET 2.0 http://msdn.microsoft.com/msdnmag/issues/06/09/CuttingEdge/default.aspx #How To: Submit and Poll for Long-Running Tasks http://msdn2.microsoft.com/en-us/library/ms979200.aspx Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#6
| |||
| |||
|
|
Hi Almog, As for the "updating control ..." question you mentioned, I think it is a typical asynchronous server-side processing and update client case, as John has suggested, generally, you can let the server-side keep processing the task(in a background thread) and the page will return the client synchronously. After that, in client page, you can use script to constantly post to the server and query the processing status, if finished, post back the page and display final result. Here are some former thread in newsgroup and tech articles in MSDN library that discussing on similar topic: http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/brow se_thread/thread/44302efa18ea9567/1619ca7b4000d2f8 #Reporting Task Progress With ASP.NET 2.0 http://msdn.microsoft.com/msdnmag/issues/06/09/CuttingEdge/default.aspx #How To: Submit and Poll for Long-Running Tasks http://msdn2.microsoft.com/en-us/library/ms979200.aspx Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#7
| |||
| |||
|
|
Hi Almog, As for the "updating control ..." question you mentioned, I think it is a typical asynchronous server-side processing and update client case, as John has suggested, generally, you can let the server-side keep processing the task(in a background thread) and the page will return the client synchronously. After that, in client page, you can use script to constantly post to the server and query the processing status, if finished, post back the page and display final result. Here are some former thread in newsgroup and tech articles in MSDN library that discussing on similar topic: http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/brow se_thread/thread/44302efa18ea9567/1619ca7b4000d2f8 #Reporting Task Progress With ASP.NET 2.0 http://msdn.microsoft.com/msdnmag/issues/06/09/CuttingEdge/default.aspx #How To: Submit and Poll for Long-Running Tasks http://msdn2.microsoft.com/en-us/library/ms979200.aspx Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
|
Hi Almog, Does the further information in my last reply helps you some? Please feel free to post here if there is anything else we can help. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |