Create a Webservice first i am writing the code in VB.Net
Protected LoginCon As System.Data.SqlClient.SqlConnection
<webmethod()> _
Public Function RetCityNames(ByVal prefixText As String) As String()
Dim count As Integer = 10
Dim Con As String = System.Web.Configuration.WebConfigurationManager.ConnectionStrings("CCon").ConnectionString
LoginCon = New System.Data.SqlClient.SqlConnection(Con)
Dim sql As String = "Select distinct CityName from CityMaster Where CityName like @prefixText"
Dim da As New System.Data.SqlClient.SqlDataAdapter(sql, LoginCon)
da.SelectCommand.Parameters.Add("@prefixText", System.Data.SqlDbType.VarChar, 50).Value = prefixText + "%"
Dim dt As New System.Data.DataTable
da.Fill(dt)
Dim items(dt.Rows.Count - 1) As String
Dim i As Integer
For Each dr As System.Data.DataRow In dt.Rows
items.SetValue(dr("CityName").ToString(), i)
i = i + 1
Next
Return items
End Function
=====
next in Textbox UI
<cc1:AutoCompleteExtender ID="txtCityName_AutoCompleteExtender" runat="server"
DelimiterCharacters="" Enabled="True" ServiceMethod="RetCityNames" ServicePath="CityService.asmx"
MinimumPrefixLength="3" TargetControlID="txtCityName">
====
As per table and Field name u change it , it will work