Author: harpreet31 | Posted on: 1/21/2011 11:04:05 PM | Views : 421

Hi,

I am developing a webiste in ASP.NET. On one of the pages page named menu.aspx, with the help of a certain login, I am getting the output in this format

foo({"1":"Jeff","2":"Mik","5":"Tom"});

I am using this code to get the output on the JSON form.

outputText += Convert.ToString(k.GetValue(0)); for (Int32 i = 1; i < k.Length; i++) { outputText += "," + Convert.ToString(k.GetValue(i)); } outputText += "}" +");"; Response.Clear(); Response.Write(outputText); Response.ContentType = "application/json";


However, I must get the output only in simple JSON on the page without any HTML.

For eg: Here's the screenshot showi ...

Go to the complete details ...