I have an asp.net web site say http://xyz.com with Default.aspx as landing page.
This url is accessed by a mobile application (j2me) which in turn sends JSON data as
JSONObject jSONObject = new JSONObject();
jSONObject.put("firstName", "abc");
jSONObject.put("lastName","xyz");
Now i am facing the problem on how to collect this data on server side.
Any help is greatly appreciated.
First you need a class that will represent the entity send by mobile application:
Now you can deserialize this entity in Page_Load method of your page like this (I’m assuming that mobile application is performing POST request):
That should do the trick (unless there are some other key assumptions that you have missed in your question)