ASP.Net ScriptMethod generating empty JSON

后端 未结 1 1655
一向
一向 2021-01-24 11:47

I\'m using JavaScript to access a ScriptService method called GetPerson(). The problem is that it is returning a fairly empty JSON string instead of an actual object string. The

相关标签:
1条回答
  • 2021-01-24 12:49

    And so it turns out that this was indeed a problem with my class file. Works a lot better with public properties.

    public string name { get; set; }
    

    2 hours of debugging is nothing vs. Stackoverflow induced inspiration. doh.

    0 讨论(0)
提交回复
热议问题