473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Textbox is not triggered when using the Auto Complete Extender

Hello Every one

My Use Case: I want to display the list of matching email address from the word typed in by the User.

Example
If the User types "a" in textbox then it shoud display

a@it.com
a@nonit.com
a@gmail.com

from Database.

I tried this but the textbox is not been triggered.

My Code is

Expand|Select|Wrap|Line Numbers
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head runat="server">
  3.     <title>Untitled Page</title>
  4. </head>
  5. <body>
  6.     <form id="form1" runat="server">
  7.         <div>
  8.             <asp:ScriptManager ID="ScriptManager1" runat="server">
  9.                             </asp:ScriptManager>
  10.             <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  11.             <div id="AutoComplete" runat="server">
  12.             </div>
  13.             <cc1:AutoCompleteExtender ID="aceTest" Enabled="true" TargetControlID="TextBox1"
  14.                 ServiceMethod="HelloWorld" runat="server" ServicePath="AutoComplete.asmx" CompletionInterval="1"
  15.                 MinimumPrefixLength="1" CompletionListElementID="AutoComplete" CompletionSetCount="20"
  16.                 EnableCaching="true">
  17.             </cc1:AutoCompleteExtender>
  18.                     </div>
  19.     </form>
  20. </body>
  21. </html>
  22.  
  23.  
  24. Autocomplete.asmx
  25. <%@ WebService Language="VB"  Class="AutoComplete" %>
  26.  
  27. Imports System.Web
  28. Imports System.Web.Services
  29. Imports System.Web.Services.Protocols
  30. Imports MailerTableAdapters
  31.  
  32. <WebService(Namespace:="http://tempuri.org/")> _
  33. <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
  34. Public Class AutoComplete
  35.     Inherits System.Web.Services.WebService
  36.  
  37.  
  38.     <WebMethod()> _
  39.  <System.Web.Script.Services.ScriptMethod()> _
  40.  Public Function HelloWorld(ByVal prefixText As String, ByVal count As Integer) As String()
  41.  
  42.         HelloWorld = GetMembers(prefixText, count)
  43.  
  44.     End Function
  45.  
  46.  
  47.  
  48.     Dim mail As New MailDetails
  49.  
  50.     Private Function GetMembers(ByVal ClientName As String, ByVal count As Integer) As String()
  51.  
  52.         Dim Members(1000) As String
  53.         Dim TotalValue As String = String.Empty
  54.         Dim result(10000) As String
  55.  
  56.         Dim Email As New getClientEmailTableAdapter
  57.         Dim getmail As Mailer.getClientEmailDataTable
  58.         getmail = mail.ViewClientMail(ClientName)
  59.         For Each checkrow As Mailer.getClientEmailRow In getmail
  60.             TotalValue &= checkrow.ClientName & "::"
  61.         Next
  62.  
  63.         Members = TotalValue.Split("::")
  64.  
  65.         Dim listOfMembers As String = String.Empty
  66.  
  67.         For Each member As String In Members
  68.  
  69.             If member.StartsWith(ClientName, StringComparison.OrdinalIgnoreCase) Then
  70.                 listOfMembers += member & vbLf
  71.             End If
  72.  
  73.         Next
  74.         result = listOfMembers.Split(vbLf)
  75.  
  76.         Array.Sort(result)
  77.  
  78.         GetMembers = result
  79.  
  80.  
  81.     End Function
  82.  
  83. End Class
How to return values from database in .asmx file i.e a webservice file.

Can someone help me out.I am in need.

Thanks in advance
Nov 29 '07 #1
2 1337
kenobewan
4,871 Expert 4TB
Never understand why people use names like textbox1 and HelloWorld... What error message do you get? What debugging have you tried?
Nov 29 '07 #2
Never understand why people use names like textbox1 and HelloWorld... What error message do you get? What debugging have you tried?
Thanks .I will reframe myself.No errror is been throwned.But if i type any word no change is throwned.Its as it is.!!!
Nov 29 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: george d lake | last post by:
Hi, Is there a way to have a "Auto Complete" textbox or a "editable" dropdown? Here is my problem. I have a screen that need to have a list of 800+ employees. To be a dropdown, that could be a...
8
by: John | last post by:
Hi, I am developing an application using VB.Net and hope that the textbox can process features which are similar to auto-complete features in Window. For example, when user types "ap" in a...
0
by: Waran | last post by:
I need to create a Auto suggests Textboox like in http://www.google.com/webhp?complete=1&hl=en I have completed this using AJAX.NET for Framework 1.1 . I have some design issues after the data is...
1
by: Melson | last post by:
Hi Can anyone help please. How can I create a Auto complete textbox using C#. Please help. Regards Melson
5
by: =?Utf-8?B?QmVuIFIu?= | last post by:
Hi, In a .NET 2.0 winforms application, I've got a textbox that, when updated, uses the validated event to cascade the change to another textbox (along with another value). This works well if...
8
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
1
by: =?Utf-8?B?UmV5?= | last post by:
I have a textbox and linked that with the autocomplete extender I have created the webservice and the WebMethod and returns a ToArray to the textbox. Everything works when I type normal string...
3
by: TS | last post by:
I am using IE 7. I have a website running on my local machine (localhost) and auto complete doesnt work for any of the textboxes, but going to web sites on the internet does support this so i know...
2
by: jd | last post by:
I have several textboxes in which the end user can enter values. When the user presses the Enter key when in any of the textboxes, or leaves that textbox, I want a routine to run (mathematical...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.