what is the correct property to check whether the current page is in the process of performing Asynchronous PostBack?

4 posts, 0 answers
  1. Hadi Teo
    Hadi Teo avatar
    23 posts
    Member since:
    Jan 2008

    Posted 02 May 2009 Link to this post


    Currently i am using WatiN to perform automated test against my ASP.NET web app. Telerik RadAjax control is used to help me perform Ajax Request between client side and server side.

    Currently when i simulate the search button click on the client side, to retrieve the table result from the server and populate back at the client using RadGrid, WatiN process my test code line synchronously, so it won't see the result, as the Ajax Call is asynchronous.

    I have encountered this page : http://pushpontech.blogspot.com/2008/04/ajax-issues-with-watin.html . and it's almost answering my issue, by checking whether the page is in asynchronous postback mode or not.

    May i know how to perform the same checking using RadAjax, because it seems that i cannot find the correct API in the Client-Side API of RadAjax.

    Thanks very much for all your help.

    hadi teo
  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 04 May 2009 Link to this post

    Hello Hadi,

    I'm not the most experienced with doing this sort of thing with RadAjax, but would it be possible to set a flag on OnRequestStart and then clean it on OnResponseEnd?  This way, all you'd ever need to do is check for that flag being raised and you'll know you're in the middle of an async request.

    Not sure how well that would work with WatiN, but in looking at the RadAjax client-side members I cannot find an equivelant to IsInAsyncPostback... but then again, since RadControls are built on top of MS Ajax, wouldn't you still have access to the page commands that pushp is referring to?

  3. DevCraft R3 2016 release webinar banner
  4. Hadi Teo
    Hadi Teo avatar
    23 posts
    Member since:
    Jan 2008

    Posted 04 May 2009 Link to this post

    Hi Serrin,

    Thanks for your workaround to set a variable on the onRequestStart event and reset that back in onResponseEnd.

    I will check also regarding the ASP.NET ajax property.


    hadi teo.
  5. Gururaj
    Gururaj avatar
    1 posts
    Member since:
    Jun 2009

    Posted 12 Jun 2009 Link to this post

    Well, you don't need to OnRequestStart / OnResponseEnd for finding whether the request is Ajax or not.

    You need to put RadAjaxManager on the .aspx page and use the IsAjaxRequest property of  RadAjaxManager to check it. This will solve your issue.



    Gururaj Nagalli

Back to Top