Aspx page - Ajax.LastData

0 favourites
  • 4 posts
  • Hi,

    I was able with the method ajax.lastdata to recover a string from a page (aspx), the code is very simple but worked very well:

    Page_Load event of the mypage.aspx:

    sGet = "1200"

    Response.Write (sGet.Trim)

    and in Construct2:

    Ajax -> Request "" (Tag: GetMyValue)

    MyString-> Ajax.LastData (Tag: GetMyValue)

    I can not understand why these commands do not work anymore, maybe it was a bit 'of time that I don't update the project, it is possible that the latest release has this problem/bug?

    Someone is able to retrieve a string from an aspx page? can you please write an example?

    Thank you for an answer,


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • We haven't changed the AJAX object for some time. Perhaps cross-domain issues are to blame. Look up AJAX in the manual for more information about that.

  • Hello Ashley,

    definitely is not a problem of cross-domain, it worked great,

    it seems that it does not recognize the command "response.write", the output sent from the web page to Construct2 is for example:



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

    <html xmlns="">


    The string "ITA;cinghialetto;2000;1" is not recognized from the method Ajax.Lastdata

    Have have please an .net example to send the output to C2?

    Thank you and best regards,


  • Hi Ashley,

    I'm really sorry, I made a programming error in Construct2: I closed the group containing the ajax commands even before they have read the method LastData.

    Thanks and best regards,


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)