access to return object from asp.net in Jquery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TWTW
    New Member
    • Sep 2011
    • 4

    access to return object from asp.net in Jquery

    I have Function in Jquery :

    Code:
     function CheckStatus() {
                $.ajax({
                    url: "http://localhost:1111/test.myControl/GetDone",
                    type: "GET",
                    dataType: "jsonp",
                    success: function (data) {
                        console.info(data.GetStatusResult);
                        if (data.IsDone) {
                            result = true;
                            CheckForFile();
                        }
                        else
                            result = false;      
                    }
                });
                
            }
    here the function that i call from asp.net mvc3:

    Code:
    public MStatus GetDone()
                {
                    ......
                    
                    return new MStatus {  IsDone = IsDone, NowDateTime=DateTime.Now};
                }
    as you see this function returns object - MStatus with variable : IsDone , I tried to check the value of IsDone , but I couldn't , Can someone tell me how to solve my problem!!!

    thanks in advance!
  • TWTW
    New Member
    • Sep 2011
    • 4

    #2
    i found my Mistake i have to replace the line : data.IsDone with : data.GetStatusR esult.IsDone

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Thank you for sharing your solution :)

      -Frinny

      Comment

      Working...