Can timeout value be set for radWindow?

4 posts, 0 answers
  1. John
    John avatar
    2 posts
    Member since:
    Apr 2011

    Posted 18 Jan 2012 Link to this post

    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.
      
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4529 posts

    Posted 18 Jan 2012 Link to this post

    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
  3. John
    John avatar
    2 posts
    Member since:
    Apr 2011

    Posted 18 Jan 2012 Link to this post

    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);
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4529 posts

    Posted 20 Jan 2012 Link to this post

    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
Back to Top