Knockout and vb.net

69 views
Skip to first unread message

mamacita

unread,
Feb 19, 2012, 5:55:07 PM2/19/12
to KnockoutJS
Since I'm coming from other language I'll like to Know how to handle
an object send by knockout via jquery to the server: say I send the
following object to a page method on vb.net

[Object { title="PRIVMSG001"}, Object { title="PRIVMSG002"}, Object
{ title="PRIVMSG003"}, 3 more...]

down to the server in vb.net how I receive and use this json to save
on a database or work with this values.


Thanks, I hope I make my self clear on this post.

dyml

unread,
Feb 23, 2012, 3:23:23 AM2/23/12
to knock...@googlegroups.com
This is slightly the wrong forum for that question.

If you are wondering how to make knockout trigger a request/POST to your server, it should be written down somewhere in the docs. Try lookig at knockoutjs.com.

If you want to know how to handle the server side code, i suggest you google "asp.net json request".

EntitySpaces

unread,
Feb 23, 2012, 7:29:37 AM2/23/12
to KnockoutJS
The easiest way is to create a WCF Service to return your native
VB.NET objects, and just tell it to talk "JSON", honestly, it's a
great way to work with JSON. Here's a C# example:

https://github.com/EntitySpaces/entityspaces.js/blob/master/Examples/EntitySpaces/esJson.svc.cs

Just create a new VB.NET WCF Service class, add it to your website,
and decorate the methods with these attributes ...

[WebInvoke(ResponseFormat = WebMessageFormat.Json, RequestFormat =
WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]



Reply all
Reply to author
Forward
0 new messages