<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ASP.NET AJAX &#8211; Passing JSON object from client to server</title>
	<atom:link href="http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/</link>
	<description>Sharing my knowledge</description>
	<lastBuildDate>Fri, 09 Jul 2010 18:54:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Krishna Chaitanya</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-34</link>
		<dc:creator>Krishna Chaitanya</dc:creator>
		<pubDate>Sun, 07 Jun 2009 20:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-34</guid>
		<description>Nice article Rajeesh!
I&#039;ve been working on same topic and saw your article on Encosia.
I have triend another approach which is handy. Check this:
http://www.novogeek.com/post/2009/06/07/Passing-JSON-objects-in-NET-35.aspx</description>
		<content:encoded><![CDATA[<p>Nice article Rajeesh!<br />
I&#8217;ve been working on same topic and saw your article on Encosia.<br />
I have triend another approach which is handy. Check this:<br />
<a href="http://www.novogeek.com/post/2009/06/07/Passing-JSON-objects-in-NET-35.aspx" rel="nofollow">http://www.novogeek.com/post/2009/06/07/Passing-JSON-objects-in-NET-35.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicsam</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-27</link>
		<dc:creator>Nicsam</dc:creator>
		<pubDate>Mon, 13 Apr 2009 13:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-27</guid>
		<description>Hi

This is SUJITH alias NICSAM... :-)

Hey dude..HAPPY VISHU.........</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>This is SUJITH alias NICSAM&#8230; <img src='http://www.rajeeshcv.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Hey dude..HAPPY VISHU&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeesh</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-26</link>
		<dc:creator>Rajeesh</dc:creator>
		<pubDate>Thu, 09 Apr 2009 17:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-26</guid>
		<description>Hi Nicsam,

Yes you are right, if we update the server method we don&#039;t need to do the serialization/deserialization.

Thanks for pointing out this.

Regards,
Rajeesh</description>
		<content:encoded><![CDATA[<p>Hi Nicsam,</p>
<p>Yes you are right, if we update the server method we don&#8217;t need to do the serialization/deserialization.</p>
<p>Thanks for pointing out this.</p>
<p>Regards,<br />
Rajeesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicsam</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-25</link>
		<dc:creator>Nicsam</dc:creator>
		<pubDate>Thu, 09 Apr 2009 04:52:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-25</guid>
		<description>Hi

But i got this worked.Please have a check follow the steps in your code you will get this

1)Modify UpdateCustomer web method to 
 public static string UpdateCustomer(Customer newCustomer)  
{
   Customer NewCustomer = newCustomer;
   return &quot;Updated&quot;;
}

2)Modify the client side function in your code as follows

function updateCustomer() 
{ 
var id = $get(&quot;custID&quot;).value; 
var name = $get(&quot;custName&quot;).value; 
var address = $get(&quot;custAdd&quot;).value;  
 
var customer = new clientCustomer(id,name,address); 

PageMethods.UpdateCustomer(customer ,callBackUpdateCustomer); 
}  

3)Try this across,hopes this should work.
Please have a check and let me know your thoughts.

Regards
Nicsam</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>But i got this worked.Please have a check follow the steps in your code you will get this</p>
<p>1)Modify UpdateCustomer web method to<br />
 public static string UpdateCustomer(Customer newCustomer)<br />
{<br />
   Customer NewCustomer = newCustomer;<br />
   return &#8220;Updated&#8221;;<br />
}</p>
<p>2)Modify the client side function in your code as follows</p>
<p>function updateCustomer()<br />
{<br />
var id = $get(&#8220;custID&#8221;).value;<br />
var name = $get(&#8220;custName&#8221;).value;<br />
var address = $get(&#8220;custAdd&#8221;).value;  </p>
<p>var customer = new clientCustomer(id,name,address); </p>
<p>PageMethods.UpdateCustomer(customer ,callBackUpdateCustomer);<br />
}  </p>
<p>3)Try this across,hopes this should work.<br />
Please have a check and let me know your thoughts.</p>
<p>Regards<br />
Nicsam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeesh</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-23</link>
		<dc:creator>Rajeesh</dc:creator>
		<pubDate>Wed, 08 Apr 2009 19:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-23</guid>
		<description>Hi Nicsam,

Thanks for the comments.

Regarding the serialization - If you don&#039;t serialize it, I don&#039;t think it will work out unless the customer object is a string because the proxy pageMethods always expects string data type. 

When we do the serialization the JavaScriptSerializer converts the Customer object to a string object(JSON format) which is passed to the Page method.

Regards,
Rajeesh</description>
		<content:encoded><![CDATA[<p>Hi Nicsam,</p>
<p>Thanks for the comments.</p>
<p>Regarding the serialization &#8211; If you don&#8217;t serialize it, I don&#8217;t think it will work out unless the customer object is a string because the proxy pageMethods always expects string data type. </p>
<p>When we do the serialization the JavaScriptSerializer converts the Customer object to a string object(JSON format) which is passed to the Page method.</p>
<p>Regards,<br />
Rajeesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicsam</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-22</link>
		<dc:creator>Nicsam</dc:creator>
		<pubDate>Wed, 08 Apr 2009 07:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-22</guid>
		<description>Hi Rajeesh
Once again i appreciate your effort to write one.
Here i doubt to ask a point,is that possible to pass the JSON object without having the serialization and deserialization processes i.e.

Like PageMethods.UpdateCustomer(Customer,callBackUpdateCustomer); 
here customer is just a object with values.

In the server side omit the deserialization process.I hope this should work out.
Please reply your thoughts.</description>
		<content:encoded><![CDATA[<p>Hi Rajeesh<br />
Once again i appreciate your effort to write one.<br />
Here i doubt to ask a point,is that possible to pass the JSON object without having the serialization and deserialization processes i.e.</p>
<p>Like PageMethods.UpdateCustomer(Customer,callBackUpdateCustomer);<br />
here customer is just a object with values.</p>
<p>In the server side omit the deserialization process.I hope this should work out.<br />
Please reply your thoughts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicsam</title>
		<link>http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/comment-page-1/#comment-21</link>
		<dc:creator>Nicsam</dc:creator>
		<pubDate>Wed, 08 Apr 2009 06:34:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.rajeeshcv.com/2008/10/aspnet-ajax-passing-json-object-from-client-to-server/#comment-21</guid>
		<description>Hi Rajeesh

Very nice article on serializing - deserializing  JSON objects.
Keep on posting similar ones.

Regards
Nicsam</description>
		<content:encoded><![CDATA[<p>Hi Rajeesh</p>
<p>Very nice article on serializing &#8211; deserializing  JSON objects.<br />
Keep on posting similar ones.</p>
<p>Regards<br />
Nicsam</p>
]]></content:encoded>
	</item>
</channel>
</rss>
