p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 3.5 Basics (http://p2p.wrox.com/forumdisplay.php?f=351)
-   -   how do i write JSON-encoded in asp.net vb? (http://p2p.wrox.com/showthread.php?t=81383)

nir987 October 26th, 2010 10:45 AM

how do i write JSON-encoded in asp.net vb?
i need to write a JSON-encoded script in mt web(asp.net vb).
how do i do it?[:confused:]

gbianchi October 26th, 2010 11:03 AM

They are classes for doing that automatic in .net 4.0. Do a google search for them.

nir987 October 26th, 2010 11:24 AM

i use asp.net 3.5 and ineed this script
PHP Code:

var message 'Check out this cute pic.'
attachment = { 
"name""i'm bursting with joy"
"href"" http://bit.ly/187gO1"
"caption""{*actor*} rated the lolcat 5 stars"
"description""a funny looking cat"
"properties": { 
"category": { "text""humor""href""http://bit.ly/KYbaN"}, 
"ratings""5 stars" 
"media": [{ 
action_links = [{"text":"Recaption this""href":"http://bit.ly/19DTbF"}];

nir987 October 26th, 2010 01:46 PM

how do i write this script in my default.aspx.vb page?

gbianchi October 26th, 2010 01:57 PM

What do you mean by write this script in my default page???

nir987 October 26th, 2010 02:19 PM

i mean that i need to run the code in my back page(default.aspx.vb)

gbianchi October 26th, 2010 02:29 PM

Wait, maybe you can clarify a lot what you need if you start posting complete data on what you have and what you want to happen...

From your post, I don't know if you want to print that json code directly to you page, you want to decode it on controls in your page, or do other things (like extracting that code from somewhere)

nir987 October 26th, 2010 04:51 PM

i need to paste this code into my web,and its must be in json encoded.
i try to write it in vb but this not support vb.
how do i put a json code like the example intro my vb.net web?

gbianchi October 26th, 2010 05:04 PM

What do you mean by paste this code????

You have to be a lot more clear so somebody can help you. You want to make a Json object on your site?

nir987 October 26th, 2010 05:23 PM

ok look
this is my vb script
PHP Code:

                attachment.caption "bla bla bla"
attachment.name "blaa blaa blaa"
attachment.href "http://apps.facebook.com/hottttttt/"
attachment.description "blalala"
attachment.properties = New attachment_property() With _
.category = New attachment_category() With _
.href "http://apps.facebook.com/hottttttt/"_
.text "blaaaa" _
}, _
.ratings "5 stars" _
attachment.media = New List(Of attachment_media)()
With New attachment_media_image
.type attachment_media_type.image
.src "http://photos-g.ak.fbcdn.net/photos-ak-snc1/v27562/114/161882717169966/app_1_161882717169966_5963.gif"
.href "http://apps.facebook.com/hottttttt/"
End With 

now i found an article that it need to in json encoded like this

i need to replace my vb code with json code

All times are GMT -4. The time now is 10:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.