Tuesday, January 05, 2010

JSON - Jquery

JSON & Jquery might have stormed well in the AJAX/WS world. But the right documents are missing. I was banging myu head for a few hours, on how to get a json object from a codebehind:

I was building a JSON object:{name:myvalue}

Tried all ways and it never workd in the Ajax method:

$.post("test.aspx?tbg=yu", $("#form1").serialize(),
function(data) {
alert(data.name); ---->Always returned undefined. In firebug it was not showing at all.


The Right solution is {name:'myvalue'}. This ******ing >>>>'<<<<< style="font-style: italic;">-Happy Hacking

No comments: