473,651 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textbox is not triggered when using the Auto Complete Extender

20 New Member
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 1350
kenobewan
4,871 Recognized Expert Specialist
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
HariKutty
20 New Member
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
1746
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 lot of scrolling. and to enter the name in a textbox leaves too many possible typos. So, is there a control that will do a auto complete in the textbox as I type the name or have a combo box that I could type and auto complete like in VB?
8
30401
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 textbox and the data associated to the textbox contains ("apple", "applet", "application"......), the application will suggest "apple" to the user to select and user can either select the suggestion or continue to type another word he disires. How...
0
2000
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 populated. For me the problem is I am getting more space after the item is selected. And the items are displayed in a combo when i am going for another search / selection without refreshing the page. I am expecting a same output as google's...
1
2270
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
7442
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 the user does indeed move the cursor to another textbox, but if the user clicks my "done" toolstripbutton after making a change in the textbox but without moving the cursor out, the validated event never fires. I have a pretty bad workaround where...
8
5743
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 can do only with ajax(xml and javascript) but i want to fetch possible values from database and want to show as the user types in text box.
1
3534
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 characters but there is a glitch when I type an hyphen character the autocomplete list starts over or breaks in other words for eg if I want to search "05-8900-09" as soon as I type "05-" the list will show as: -8900 -8901 (it omits 05- and the...
3
4004
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 the browser has this config turned on. any ideas why it doesnt work on my local web application (.net 2)? thanks
2
3724
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 analysis followed by plotting a graph). Since it is relatively slow (less than a second, but makes the updating sluggish) I only want it to be triggered when the value in one of the textboxes is actually changed by the user - pressing Enter or leaving...
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8571
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.