How To Call Webservice Sing Method From Both Control.

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 1442
hi

How To Call Webservice Sing Method From Both Control.

Webservice Code
====================

[WebMethod]
public List<string> GetCountries(string prefixText)
{
List<string> CountryNames = new List<string>();
return CountryNames;
}


Client Side
======================

<asp:TextBox ID="txtCountry" runat="server"></asp:TextBox>

<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtCountry" ServicePath="WebService.asmx"
MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" ServiceMethod="GetCountries">
</asp:AutoCompleteExtender>



<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<asp:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" TargetControlID="TextBox1" ServicePath="WebService.asmx"
MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" ServiceMethod="GetCountries"></asp:AutoCompleteExtender>

Comments or Responses

Login to post response