AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Autocomplete source textbox in asp.net3.5
Posted by Anil on  9/5/2009 5:33:02 AM Category: AJAX
Add to my favorites
Email to friend
i am using VS 2008.
my web service is

<WebMethod()> _
Public Function GetCountryInfo(ByVal ptrfixTest As String, ByVal count As Integer, ByVal contextKey As String) As String
If contextKey = "Country" Then
str = "select * from insitute_country where insitute_country like @ptrfixTest "
End If
conn.Open()
da = New SqlDataAdapter(str, conn)
da.SelectCommand.Parameters.Add("@ptrfixTest", SqlDbType.NVarChar, 500).Value = ptrfixTest + "%"
Dim dt As New DataTable
dt = New DataTable
da.Fill(dt)
Dim items() As String = New String((dt.Rows.Count) - 1) {}
Dim i As Integer
For Each dr In dt.Rows
items.SetValue(dr("insitute_country").ToString, i)
i = i + 1
Next
conn.Close()
Return i
End Function



and my default.aspx is


<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="WebService.asmx" />
</Services>
</asp:ScriptManager>
<table style="width: 52%;">
<tr>
<td>
&nbsp;
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server" Width="216px" EnableTheming="True"></asp:TextBox>

<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength="1" ServiceMethod="GetCountryInfo" ServicePath="WebService.asmx" TargetControlID="TextBox1">
</ajaxToolkit:AutoCompleteExtender>
</td>
</table>

Post Your Reply Post New Question

 Viewer's Reply
Re-Post for .Net 3.5
Answered By Moderator1 on 9/15/2009 10:27:27 PM
So, you have posted the Auto Complete Text Box Ajax Control Tool kit control for the latest 3.5 framework version..
 
Yes i am using 3.5
Answered By Anil on 9/22/2009 6:33:59 AM
Yes i am using 3.5
help me
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
No Nonsense XML Web Development With PHP - Free 146 Page Preview!
Washington Technology
Simply SQL - Free 111 Page Preview!