﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Call WebService from Client</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Call-WebService-from-Client/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Call WebService from Client</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Call-WebService-from-Client/</link><pubDate>Mon, 01 Nov 2010 00:03:49 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I made a minor modification to JavascriptWebService project by adding a method in the GetUsers class (the class file of GetUsers WebService) that has a single string parameter.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;[&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: #2b91af; font-size: 9pt"&gt;WebMethod&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;]&lt;/span&gt;
&lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;public string&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;GetUsrs(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;string&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;name)
{&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;return&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;name;
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I simply invoke the method by using following line.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;FetchUsers()
{
    GetUsers.GetUsrs(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: #a31515; font-size: 9pt"&gt;"test"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;);
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Call WebService from Client</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Call-WebService-from-Client/</link><pubDate>Sat, 30 Oct 2010 17:34:12 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;Thanks - this example works well.&lt;/p&gt;
&lt;p&gt;Do you have an example where you pass data over to the WebService?  I would like to pass all of the checked rows in my grid back to the WebService - at least the ID of each row.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Dave&lt;/p&gt;</description></item><item><title>Call WebService from Client</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Call-WebService-from-Client/</link><pubDate>Thu, 28 Oct 2010 14:10:49 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to do the following.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;First, add the web service reference to the aspx page where you are planning to call this web service. In the aspx page inside form tag add following lines.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;asp:ScriptManager ID="MyService" runat="server"&amp;gt;
    &amp;lt;Services&amp;gt;
        &amp;lt;asp:ServiceReference Path="~/GetUsers.asmx" /&amp;gt;
    &amp;lt;/Services&amp;gt;
&amp;lt;/asp:ScriptManager&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Add script manager reference and add a service reference by adding a path to it. In the sample above, the service name is WebService.asmx.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Next, write the JavaScript function which calls the web service.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function FetchUsers(){    
    GetUsers.GetUsrs(OnWSRequestComplete, OnWSRequestFailed);
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I enclosed a sample project as attachment. Please let us know whether it helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Call WebService from Client</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Call-WebService-from-Client/</link><pubDate>Tue, 26 Oct 2010 22:05:23 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;div&gt;I am using Client Binding with a WebService.  When a user clicks a button below my Grid, I would like to get the ID of all of the Rows Checked and then send those IDs to a WebService which will perform a mapping operation.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;How do I call the WebService from the Client and pass those IDs?&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Dave&lt;/div&gt;</description></item></channel></rss>