Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > JSon

Reply
 
 
shapper
Guest
Posts: n/a
 
      07-13-2008
Hello,

I need to create an aspx file which returns a JSON string.

In fact I want to return a specific string for testing a JQuery code I
am working in:

[{"TagID":"017b253e-596b-4328-85f5-
fd97a783759c","Name":"Física","FileTags":[],"ProfessorTags":[]},
{"TagID":"3fae2160-55f6-4dd0-b856-
fd27f5d307e2","Name":"Matemática","FileTags":[],"ProfessorTags":[]},
{"TagID":"883b197e-0cb3-4528-8403-0877d742bf47","Name":"Matemática
B","FileTags":[],"ProfessorTags":[]},{"TagID":"f183cb9d-9d92-4c61-b03a-
e51cc1205b2b","Name":"Português","FileTags":[],"ProfessorTags":[]}]

Could someone tell me how to do this?

Thanks,

Miguel
 
Reply With Quote
 
 
 
 
Munna
Guest
Posts: n/a
 
      07-13-2008
Hi

This is what you need i think...
check it out..
http://www.aspcode.net/JQuery-and-AS...with-JSON.aspx

Best of luck

-----------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
 
Reply With Quote
 
 
 
 
shapper
Guest
Posts: n/a
 
      07-13-2008
On Jul 13, 4:59*pm, Munna <(E-Mail Removed)> wrote:
> Hi
>
> This is what you need i think...
> check it out..http://www.aspcode.net/JQuery-and-AS...sses-with-JSON....
>
> Best of luck
>
> -----------
> Munna
>
> http://www.munna.shatkotha.com/blogw....shatkotha.com


Hi,

I created the following for testing purposes:

/// <summary>
/// Summary description for $codebehindclassname$
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MyData : IHttpHandler {

public void ProcessRequest(HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("[{'TagID':'3fae2160-55f6-4dd0-b856-
fd27f5d307e2','Name':'Matemática','FileTags':[],'ProfessorTags':[]},
{'TagID':'883b197e-0cb3-4528-8403-0877d742bf47','Name':'Matemática
B','FileTags':[],'ProfessorTags':[]}]");
}

public bool IsReusable {
get {
return false;
}
}
}

However, I don't want to create and compile a project. I want only to
upload this to my server ... how can I call this from a simple aspx
page?

Thanks,
Miguel
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lib to generate XML/JSON[P] output from a DTD/XSD/JSON Schema/etc Acácio Centeno Python 1 02-15-2013 07:34 AM
I am facing an issue while decoding json string using json.loads sajuptpm Python 2 12-28-2012 07:16 AM
[ANN] Security Fix json-1.1.7 for json_pure and json gems Florian Frank Ruby 0 06-30-2009 05:18 PM
"JSON for ASP" at json.org Tuðrul Topuz ASP General 1 06-27-2008 11:37 PM
simple AJAX with JSON Wensheng Python 0 10-03-2005 07:20 PM



Advertisments