<?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: CheckBox GridView Column with a web service call</title>
	<atom:link href="http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=checkbox-gridview-column-with-a-web-service-call</link>
	<description></description>
	<lastBuildDate>Sun, 12 Feb 2012 18:54:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Chris Brandsma</title>
		<link>http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/comment-page-1/#comment-36506</link>
		<dc:creator>Chris Brandsma</dc:creator>
		<pubDate>Wed, 29 Oct 2008 20:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/#comment-36506</guid>
		<description>Hey Scott,

I&#039;m doing that right now, but I&#039;m using the Microsoft AJAX ScriptManager to do it.  The ScriptManager wraps all of that for me very nicely.  The key to remember is that you get the data back as part of a callback method, not directly from the method itself.

So if you call a WebService method

[System.Web.Script.Services.ScriptService]
public class JobService: System.Web.Services.WebService
{
[ScriptMethod]
public List GetJobs(string forUserId)
{
  return new List();
}
}

You will setup the scriptmananger like this:
    
            
                
               
    

Then, your Javascript will look like this:
function CallWebService(userId) {
FSDispatchWeb.JobService.GetJobs(userId, OnJobsRetrieved);
}
function OnJobsRetrieved(jobList) {
   // do something with jobList array
}

But if you want a JQuery way of calling a web service, you would use the $.ajax method</description>
		<content:encoded><![CDATA[<p>Hey Scott,</p>
<p>I&#8217;m doing that right now, but I&#8217;m using the Microsoft AJAX ScriptManager to do it.  The ScriptManager wraps all of that for me very nicely.  The key to remember is that you get the data back as part of a callback method, not directly from the method itself.</p>
<p>So if you call a WebService method</p>
<p>[System.Web.Script.Services.ScriptService]<br />
public class JobService: System.Web.Services.WebService<br />
{<br />
[ScriptMethod]<br />
public List GetJobs(string forUserId)<br />
{<br />
  return new List();<br />
}<br />
}</p>
<p>You will setup the scriptmananger like this:</p>
<p>Then, your Javascript will look like this:<br />
function CallWebService(userId) {<br />
FSDispatchWeb.JobService.GetJobs(userId, OnJobsRetrieved);<br />
}<br />
function OnJobsRetrieved(jobList) {<br />
   // do something with jobList array<br />
}</p>
<p>But if you want a JQuery way of calling a web service, you would use the $.ajax method</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/comment-page-1/#comment-36504</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Wed, 29 Oct 2008 17:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/#comment-36504</guid>
		<description>The next question being is how to return something from the webservice.

if you webservice.reviewed returned a string &quot;hello world&quot;, how would you retrieve the string &quot;hello world&quot; and bring it back to the javascript function?</description>
		<content:encoded><![CDATA[<p>The next question being is how to return something from the webservice.</p>
<p>if you webservice.reviewed returned a string &#8220;hello world&#8221;, how would you retrieve the string &#8220;hello world&#8221; and bring it back to the javascript function?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: n</title>
		<link>http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/comment-page-1/#comment-29596</link>
		<dc:creator>n</dc:creator>
		<pubDate>Tue, 12 Aug 2008 07:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/02/checkbox-gridview-column-with-a-web-service-call/#comment-29596</guid>
		<description>bm</description>
		<content:encoded><![CDATA[<p>bm</p>
]]></content:encoded>
	</item>
</channel>
</rss>

