How can I expose the data in json format ..??? I tried creating a JSON string using C# code in an aspx file and outputting it. For example, On opening default.aspx on browser , it out puts only json string. But I can’t use the default.aspx link while processing in android sdk as the http response will include html tags also.
Basically if I select view source when I open the dafault.aspx, I can see html tags not just the JSON string. when I open json api for twitter,google calender and select view source they does not contain html. Can anyone help me create only json out put …??? I have data in sql server and quite good at C# coding.
Thanks in advance ….!!!
something like:
This is the aspx code behind example. The aspx file gets ignored after Response.End(). Or do it in an ashx file and forgo htmlpage markup.
Or even better, consider using a web service. WCF or an asmx .