<?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: Using jQuery to Consume ASP.NET JSON Web Services</title>
	<atom:link href="http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:50:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Umair Aslam Bhatti</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-62774</link>
		<dc:creator>Umair Aslam Bhatti</dc:creator>
		<pubDate>Mon, 30 Jan 2012 04:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-62774</guid>
		<description>Hey , nice post i have ever read about web service callback using jquery json , Great work , But I am amazed to view that there are so many methods for calling webservice methods.
But any ways that is awesom post. 
Cheers man !</description>
		<content:encoded><![CDATA[<p>Hey , nice post i have ever read about web service callback using jquery json , Great work , But I am amazed to view that there are so many methods for calling webservice methods.<br />
But any ways that is awesom post.<br />
Cheers man !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-62752</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sat, 28 Jan 2012 03:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-62752</guid>
		<description>That&#039;s a big question. People have been discussing &quot;large JavaScript&quot; development for several years now, and there&#039;s not a lot of consensus or &quot;right&quot; approaches.

In my projects, using the revealing module pattern and breaking my JavaScript into many files (e.g. project.data.js, project.ui.js, project.ui.slider.js) are two of the most useful tools in keeping the projects manageable.

There are MVC frameworks for JavaScript. Backbone is a popular one. However, that&#039;s not necessarily something you need to graft into your project if you&#039;re still using many ASP.NET pages and a traditional navigation model. Client-side MVC is more targeted to single page applications (e.g. GMail, most of Facebook, new Twitter).</description>
		<content:encoded><![CDATA[<p>That&#8217;s a big question. People have been discussing &#8220;large JavaScript&#8221; development for several years now, and there&#8217;s not a lot of consensus or &#8220;right&#8221; approaches.</p>
<p>In my projects, using the revealing module pattern and breaking my JavaScript into many files (e.g. project.data.js, project.ui.js, project.ui.slider.js) are two of the most useful tools in keeping the projects manageable.</p>
<p>There are MVC frameworks for JavaScript. Backbone is a popular one. However, that&#8217;s not necessarily something you need to graft into your project if you&#8217;re still using many ASP.NET pages and a traditional navigation model. Client-side MVC is more targeted to single page applications (e.g. GMail, most of Facebook, new Twitter).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sathish Kumara</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-62664</link>
		<dc:creator>Sathish Kumara</dc:creator>
		<pubDate>Fri, 27 Jan 2012 07:34:05 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-62664</guid>
		<description>Hi Dave,
1. Is there is any specific architecture/ design pattern available for jquery used in asp.net?
2. If yes, can I implement the MVC architecture in your code?  Can you please show me how to implement this in your code.

The reason behind this is, I&#039; am having many asp.net pages where hell lots of below codes are implemented in a single file itself. How to customise this??

$.ajax({
                url: ..
                contentType: &quot;application/json; charset=utf-8&quot;,
                data: {...},
                dataType: &quot;json&quot;,
                responseType: &quot;json&quot;,
                cache: false, ............

Thanks in advance,
Sathish Kumar A</description>
		<content:encoded><![CDATA[<p>Hi Dave,<br />
1. Is there is any specific architecture/ design pattern available for jquery used in asp.net?<br />
2. If yes, can I implement the MVC architecture in your code?  Can you please show me how to implement this in your code.</p>
<p>The reason behind this is, I&#8217; am having many asp.net pages where hell lots of below codes are implemented in a single file itself. How to customise this??</p>
<p>$.ajax({<br />
                url: ..<br />
                contentType: &#8220;application/json; charset=utf-8&#8243;,<br />
                data: {&#8230;},<br />
                dataType: &#8220;json&#8221;,<br />
                responseType: &#8220;json&#8221;,<br />
                cache: false, &#8230;&#8230;&#8230;&#8230;</p>
<p>Thanks in advance,<br />
Sathish Kumar A</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikolay Evseev</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-62461</link>
		<dc:creator>Nikolay Evseev</dc:creator>
		<pubDate>Wed, 25 Jan 2012 12:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-62461</guid>
		<description>Simplicity is the core! Great article Dave! Thanks!</description>
		<content:encoded><![CDATA[<p>Simplicity is the core! Great article Dave! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heinrich</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-61347</link>
		<dc:creator>Heinrich</dc:creator>
		<pubDate>Thu, 12 Jan 2012 06:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-61347</guid>
		<description>Hi guys,

Just one note i wish to make, 100kb can be a lot! I am in a country where broadband is extremely limited! And speed is a huge concern. I am on a web dev team to speed up the process of web loading time, a designated post!

I thank you guys a lot for these posts.
It might seem worthless to some to &quot;increase&quot; speed by 5ms... But to some 5ms is 3sec for others... 3 sec no one can afford to lose.

Never give up on your dreams and hopes.
In anti- depression, the line is &quot;To the world you might be someone, but to someone, you are the world...&quot;.
You can figure out the inspirational line in the technology movement.</description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>Just one note i wish to make, 100kb can be a lot! I am in a country where broadband is extremely limited! And speed is a huge concern. I am on a web dev team to speed up the process of web loading time, a designated post!</p>
<p>I thank you guys a lot for these posts.<br />
It might seem worthless to some to &#8220;increase&#8221; speed by 5ms&#8230; But to some 5ms is 3sec for others&#8230; 3 sec no one can afford to lose.</p>
<p>Never give up on your dreams and hopes.<br />
In anti- depression, the line is &#8220;To the world you might be someone, but to someone, you are the world&#8230;&#8221;.<br />
You can figure out the inspirational line in the technology movement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric de Redelijkheid</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-57323</link>
		<dc:creator>Eric de Redelijkheid</dc:creator>
		<pubDate>Tue, 27 Dec 2011 12:11:24 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-57323</guid>
		<description>This came up on the 70-562 exam!</description>
		<content:encoded><![CDATA[<p>This came up on the 70-562 exam!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paúl Somarriba (piyey)</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-55229</link>
		<dc:creator>Paúl Somarriba (piyey)</dc:creator>
		<pubDate>Mon, 19 Dec 2011 16:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-55229</guid>
		<description>Sorry for the last comment, my fault, I didnt write the attribute class  to the web service, now I works very well, thanks =)</description>
		<content:encoded><![CDATA[<p>Sorry for the last comment, my fault, I didnt write the attribute class  to the web service, now I works very well, thanks =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paúl Somarriba (piyey)</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-55208</link>
		<dc:creator>Paúl Somarriba (piyey)</dc:creator>
		<pubDate>Mon, 19 Dec 2011 14:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-55208</guid>
		<description>I tried your last example and didnt work, i trie to do it like encosia tutorial and didnt work, can u provide me an functional example?

Thanks</description>
		<content:encoded><![CDATA[<p>I tried your last example and didnt work, i trie to do it like encosia tutorial and didnt work, can u provide me an functional example?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chrishna</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-54314</link>
		<dc:creator>chrishna</dc:creator>
		<pubDate>Fri, 16 Dec 2011 06:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-54314</guid>
		<description>ThanQ Dave</description>
		<content:encoded><![CDATA[<p>ThanQ Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-54313</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Fri, 16 Dec 2011 05:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-54313</guid>
		<description>You need something like this to get the parameter name right:

&lt;pre lang=&quot;javascript&quot;&gt;var student = {
  Name: &#039;Dave&#039;,
  Rno: 7
};

var params = JSON.stringify({ objStudent: student });

$.ajax({
  // url, contentType, etc
  data: params,
  // The rest of your AJAX call here.
});&lt;/pre&gt;

More info here: http://encosia.com/using-complex-types-to-make-calling-services-less-complex/</description>
		<content:encoded><![CDATA[<p>You need something like this to get the parameter name right:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> student <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">Name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'Dave'</span><span style="color: #339933;">,</span>
  Rno<span style="color: #339933;">:</span> <span style="color: #CC0000;">7</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> params <span style="color: #339933;">=</span> JSON.<span style="color: #660066;">stringify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> objStudent<span style="color: #339933;">:</span> student <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// url, contentType, etc</span>
  data<span style="color: #339933;">:</span> params<span style="color: #339933;">,</span>
  <span style="color: #006600; font-style: italic;">// The rest of your AJAX call here.</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>More info here: <a href="http://encosia.com/using-complex-types-to-make-calling-services-less-complex/" rel="nofollow">http://encosia.com/using-complex-types-to-make-calling-services-less-complex/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chrishna</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-54299</link>
		<dc:creator>chrishna</dc:creator>
		<pubDate>Fri, 16 Dec 2011 05:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-54299</guid>
		<description>Hi,
 Am now learing jquery with asp.net. Am facing a problem to make a ajax hit. while passing parameters to asp.net page webmethod.
code:  

&lt;pre lang=&quot;javascript&quot;&gt;        $(document).ready(function() {
            $(&quot;#RetStudent&quot;).live(&quot;click&quot;, function() {
                var Student = {}; // new Object;
                Student.Name = &quot;Madhu&quot;;
                Student.Rno = 5;
                var params = JSON.stringify(Student);
                $.ajax({
                    type: &quot;POST&quot;,
                    url: &quot;AjaxPage.aspx/getDetails&quot;,
                    data: &quot;{&quot;+ params +&quot;}&quot;,
                    contentType: &#039;application/json; charset=utf-8&#039;,
                    dataType: &#039;json&#039;,
                    success: function(r) {
                            alert(r.d.Name);
                            alert(r.d.Rno);
                    },
                    error: function() {
                        alert(arguments[2]);
                    }
                });
            });
        });&lt;/pre&gt;
    


page webmethod:

&lt;pre lang=&quot;csharp&quot;&gt;    public class Student
    {
        string name;
        int rno;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public int Rno
        {
            get { return rno; }
            set { rno = value; }
        }
    }
    
    [WebMethod]
    [System.Web.Script.Services.ScriptMethod()]
    public static Student getDetails(Student objStudent)
    {
        objStudent.Name = &quot;MadhuKrishna&quot;;
        objStudent.Rno = 7;
        return objStudent;
    }&lt;/pre&gt;

please let me know wat i did wrong in this.

am getting internal server error.
Thanks in Adv.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
 Am now learing jquery with asp.net. Am facing a problem to make a ajax hit. while passing parameters to asp.net page webmethod.<br />
code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">        $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#RetStudent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #003366; font-weight: bold;">var</span> Student <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// new Object;</span>
                Student.<span style="color: #000066;">Name</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Madhu&quot;</span><span style="color: #339933;">;</span>
                Student.<span style="color: #660066;">Rno</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> params <span style="color: #339933;">=</span> JSON.<span style="color: #660066;">stringify</span><span style="color: #009900;">&#40;</span>Student<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                    type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;POST&quot;</span><span style="color: #339933;">,</span>
                    url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;AjaxPage.aspx/getDetails&quot;</span><span style="color: #339933;">,</span>
                    data<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;{&quot;</span><span style="color: #339933;">+</span> params <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;}&quot;</span><span style="color: #339933;">,</span>
                    contentType<span style="color: #339933;">:</span> <span style="color: #3366CC;">'application/json; charset=utf-8'</span><span style="color: #339933;">,</span>
                    dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">'json'</span><span style="color: #339933;">,</span>
                    success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>r.<span style="color: #660066;">d</span>.<span style="color: #000066;">Name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>r.<span style="color: #660066;">d</span>.<span style="color: #660066;">Rno</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>page webmethod:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> Student
    <span style="color: #000000;">&#123;</span>
        <span style="color: #FF0000;">string</span> name<span style="color: #008000;">;</span>
        <span style="color: #FF0000;">int</span> rno<span style="color: #008000;">;</span>
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> Name
        <span style="color: #000000;">&#123;</span>
            get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> name<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
            set <span style="color: #000000;">&#123;</span> name <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> Rno
        <span style="color: #000000;">&#123;</span>
            get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> rno<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
            set <span style="color: #000000;">&#123;</span> rno <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #000000;">&#91;</span>WebMethod<span style="color: #000000;">&#93;</span>
    <span style="color: #000000;">&#91;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Web</span></span>.<span style="color: #0000FF;">Script</span>.<span style="color: #0000FF;">Services</span>.<span style="color: #0000FF;">ScriptMethod</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> Student getDetails<span style="color: #000000;">&#40;</span>Student objStudent<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        objStudent.<span style="color: #0000FF;">Name</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;MadhuKrishna&quot;</span><span style="color: #008000;">;</span>
        objStudent.<span style="color: #0000FF;">Rno</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">7</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF;">return</span> objStudent<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span></pre></div></div>

<p>please let me know wat i did wrong in this.</p>
<p>am getting internal server error.<br />
Thanks in Adv.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Successful jQuery $.ajax call returns JSON but throws &#8220;parsererror&#8221;&#124; DautNet Blog</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-50120</link>
		<dc:creator>Successful jQuery $.ajax call returns JSON but throws &#8220;parsererror&#8221;&#124; DautNet Blog</dc:creator>
		<pubDate>Tue, 29 Nov 2011 17:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-50120</guid>
		<description>[...] empty &#8220;data&#8221; parameter method wouldn&#8217;t work for me because I needed to pass [...]</description>
		<content:encoded><![CDATA[<p>[...] empty &#8220;data&#8221; parameter method wouldn&#8217;t work for me because I needed to pass [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learning jQuery using jQuery Lab</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-46330</link>
		<dc:creator>Learning jQuery using jQuery Lab</dc:creator>
		<pubDate>Fri, 07 Oct 2011 12:22:27 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-46330</guid>
		<description>[...] In above query, we are calling getEmpByName  method of the webservice mySvc.asmx. While calling webservice one should take care of few things like passing default data as a string&quot;{}&quot;, and passing contentType: &quot;application/json; charset=utf-8&quot; in $.ajax method. I will recommend to read  Dave&#8217;s article . [...]</description>
		<content:encoded><![CDATA[<p>[...] In above query, we are calling getEmpByName  method of the webservice mySvc.asmx. While calling webservice one should take care of few things like passing default data as a string&quot;{}&quot;, and passing contentType: &quot;application/json; charset=utf-8&quot; in $.ajax method. I will recommend to read  Dave&#8217;s article . [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-46294</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Wed, 05 Oct 2011 19:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-46294</guid>
		<description>JSONP works, but it&#039;s kind of flaky compared to a traditional XMLHttpRequest-based AJAX request. Since it works by just injecting a script reference into the page, you lose some of the control you might be used to.

Since you control the browser your users will be using, CORS might be a better approach in your case. When you say &quot;device&quot; and &quot;docked&quot;, I&#039;m assuming a tablet type device? Most modern browsers (like the WebKit-based browsers on iOS, Android, and BlackBerry) do support CORS well, which would allow you to make a jQuery $.ajax() call as simply as if it were a local service. The only thing you&#039;ll need to do is configure your server&#039;s IIS to add the CORS HTTP headers to its responses. Details here: http://enable-cors.org/</description>
		<content:encoded><![CDATA[<p>JSONP works, but it&#8217;s kind of flaky compared to a traditional XMLHttpRequest-based AJAX request. Since it works by just injecting a script reference into the page, you lose some of the control you might be used to.</p>
<p>Since you control the browser your users will be using, CORS might be a better approach in your case. When you say &#8220;device&#8221; and &#8220;docked&#8221;, I&#8217;m assuming a tablet type device? Most modern browsers (like the WebKit-based browsers on iOS, Android, and BlackBerry) do support CORS well, which would allow you to make a jQuery $.ajax() call as simply as if it were a local service. The only thing you&#8217;ll need to do is configure your server&#8217;s IIS to add the CORS HTTP headers to its responses. Details here: <a href="http://enable-cors.org/" rel="nofollow">http://enable-cors.org/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianR</title>
		<link>http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/#comment-46290</link>
		<dc:creator>BrianR</dc:creator>
		<pubDate>Wed, 05 Oct 2011 17:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/#comment-46290</guid>
		<description>Dave,
Many thanks for keeping up with this topic &amp; continuing to respond!!

We are looking at developing local Web app with static HTML pages(on a device - not hosted on a server).
When the device is docked it will acquire a network connection and make HTTPS WCF Service calls to update server databases.

It seems like using jQuery would be a good fit for making the web service calls but after a pass thru this blog entry I have 2 initial questions?
1. Is JSONP an appropriate jQuery mechanism to deal with a cross-domain HTTPS request?
2. Are you aware of any gotchas trying to interface a JSONP request to a WCF Service, and can you provide any references that would assist?</description>
		<content:encoded><![CDATA[<p>Dave,<br />
Many thanks for keeping up with this topic &amp; continuing to respond!!</p>
<p>We are looking at developing local Web app with static HTML pages(on a device &#8211; not hosted on a server).<br />
When the device is docked it will acquire a network connection and make HTTPS WCF Service calls to update server databases.</p>
<p>It seems like using jQuery would be a good fit for making the web service calls but after a pass thru this blog entry I have 2 initial questions?<br />
1. Is JSONP an appropriate jQuery mechanism to deal with a cross-domain HTTPS request?<br />
2. Are you aware of any gotchas trying to interface a JSONP request to a WCF Service, and can you provide any references that would assist?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

