This is a migrated thread and some comments may be shown as answers.

Can timeout value be set for radWindow?

3 Answers 116 Views
Window
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 18 Jan 2012, 08:05 AM
Hello,

I have a radWindow being launched that runs a c# script that sends x number of http post requests to an external server using a WebClient control. Each http post contains instructions to send a single text message. I haven't experienced any time out problems as yet (so far I've only sent 80, which took approximately 40 seconds after which the ajax circle disappears and the results are displayed), however, with larger numbers I think that timeout could be an issue.

Does radWindow use the timeout value as set in the application's web.config, or can you set it elsewhere?

Ideally, is there a way to make it persist until the code has finished executing?

Thanks,

John.
  

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 18 Jan 2012, 05:28 PM
Hello John,

  The RadWindow is not affected by the page that is loaded inside (unless you add a JavaScript function that works with it, of course). The only exception is that we use the iframe's load event for two things - to fire the OnClientPageLoaded event of the control and to remove the loading sign (if it was present). This loading sign will continue spinning until this event is fired by the page that is loaded inside, so as long as your requests are not completed it will stay on. Alternatively, if you wish to remove the loading sign at some point you need to get the content cell of the RadWindow and remove the rwLoading class from it (e.g. Sys.UI.DomElement.removeCssClass( $find("RW1")._contentCell, "rwLoading"); ). Let me know if you have any further questions.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
John
Top achievements
Rank 1
answered on 19 Jan 2012, 05:50 AM
Thanks for the response Marin.

The process that is executed on server-side during page_load, that I am running in a radWindow, could potentially take more than a minute to finish as it sends x number of post requests and displays the return result of each. What I am hoping to do is to display each return result as it is received during execution of the process. At the moment the results are not shown until the process has finished, and until that time the ajax circle is shown. My concern is that people may think something has gone wrong and close the radWindow before the process has finished. I've experimented with page buffer = "false", and response.flush(), but this doesn't seem to work. Would you know of a way to get this to work (any sample code would be greatly appreciated). Thanks.

<%@ Page Buffer="false" ... %>
.
.
// send post request and retrieve response for each mobile in query
 
Response.Write(mobile + " " + post_response + "<br/>");
Response.Flush();
System.Threading.Thread.Sleep(2000);
0
Marin Bratanov
Telerik team
answered on 20 Jan 2012, 04:59 PM
Hello John,

Markup is sent to the client only once the entire server-side processing is complete, so what you can do is either create a custom message that will warn the user to expect a delay (as explained in this KB), or load the page initially without these requests (but with this warning), then after that initiate an AJAX request that will add the needed content (as explained in this article). These are the ways I can think of to create a user-friendly message to improve usability.

Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Window
Asked by
John
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
John
Top achievements
Rank 1
Share this question
or