Write a Json method that returns Json result and bind to gridview RRS feed

  • Question

  • User-148788041 posted

    i have a json string {"name:'ddd',number:1}

    how to write a json method for Api Web response. Then i need to read name and number value and bind to grid view,

    Wednesday, November 29, 2017 7:49 PM

All replies

  • User753101303 posted


    This is really a string? You get this from where? With Web Api you usually get and send objects as the underlying json serialization/deserialization is handled for you.

    Once done you get an object (or a list of objets) on the client side. Binding to a grid likely depends on the kind of grid you are using (it maye have built in methods do to that or is this your own grid or a built in grid).

    Wednesday, November 29, 2017 8:32 PM
  • User-148788041 posted

    There is an Web Api url. the response can be success jsonResult and failure JsonResult. The above one is an example for failuure json result.I need to write an Json function that returns json as string . 

    Thursday, November 30, 2017 12:56 AM
  • User347430248 posted

    Hi guhananth,

    you can try to refer link below may help you to solve your issue.

    Working with JSON

    if the also you have any further questions then let us know about that. we will try to provide you further suggestions to solve the issue.



    Thursday, November 30, 2017 3:11 AM