473,807 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble using AutoCompleteExt ender

hi

VS2008

I have trouble getting the AutoCompleteExt ender to work. I've seen the video
at
http://www.asp.net:80/learn/ajax-videos/video-122.aspx but don't understand
what I do wrong. I've even downloaded the source code next to the video and
cannot see what I do wrong here. When I run the .aspx webpage, I start
typing in the textbox but isn't called after I've typed in 3 chars. I know
that method isn't called as I've set a breakpoint in the start of the
GetCompletionLi st method.

In my datasource there is a name with the pattern "uuu", so if I start
typing "uuu" atleast that name shold be displayed...

*** markup in my .aspx webpage *************** **
<asp:ScriptMana ger ID="ScriptManag er1" runat="server">
<Services>
<asp:ServiceRef erence Path="~/Services/AutoCompleteNam e.asmx" />
</Services>
</asp:ScriptManag er>

Name: <asp:TextBox ID="txtName" runat="server"> </asp:TextBox>
<ajaxToolkit:Au toCompleteExten der ID="AutoComplet eExtender1"
runat="server"
TargetControlID ="txtName"
ServicePath="~/Services/AutoCompleteNam e.asmx"
ServiceMethod=" GetCompletionLi st"
MinimumPrefixLe ngth="3" CompletionSetCo unt="10" >
</ajaxToolkit:Aut oCompleteExtend er>

******* *************** *

[WebService(Name space = "http://tempuri.org/")]
[WebServiceBindi ng(ConformsTo = WsiProfiles.Bas icProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX,
uncomment the following line.
// [System.Web.Scri pt.Services.Scr iptService]
public class AutoCompleteNam e : System.Web.Serv ices.WebService {

public AutoCompleteNam e () {

//Uncomment the following line if using designed components
//InitializeCompo nent();
}

[WebMethod]
public string[] GetCompletionLi st(string prefixText, int count)
{
List<NamenameCo llection = Name.GetNames(p refixText, count);
List<stringname s = null;
foreach (Name name in nameCollection)
{
names.Add(name. surename);
}
return names.ToArray() ;
}

}

could it be caused by this: ServicePath="~/Services/AutoCompleteNam e.asmx"
in the video source code it is ServicePath="Au toCompleteName. asmx", but I've
created a subfolder for my .asmx files just in case my project will have
more .asmx files. I thought it was a nice way of keeping the project tidy,
not having everything in the root folder.....

any suggestions?
Nov 21 '08 #1
2 4978


"Jeff" <it************ @hotmail.com.NO SPAMwrote in message
news:ec******** ******@TK2MSFTN GP05.phx.gbl...
hi

VS2008

I have trouble getting the AutoCompleteExt ender to work. I've seen the
video at
http://www.asp.net:80/learn/ajax-videos/video-122.aspx but don't
understand what I do wrong. I've even downloaded the source code next to
the video and cannot see what I do wrong here. When I run the .aspx
webpage, I start typing in the textbox but isn't called after I've typed
in 3 chars. I know that method isn't called as I've set a breakpoint in
the start of the GetCompletionLi st method.

In my datasource there is a name with the pattern "uuu", so if I start
typing "uuu" atleast that name shold be displayed...

*** markup in my .aspx webpage *************** **
<asp:ScriptMana ger ID="ScriptManag er1" runat="server">
<Services>
<asp:ServiceRef erence Path="~/Services/AutoCompleteNam e.asmx" />
</Services>
</asp:ScriptManag er>

Name: <asp:TextBox ID="txtName" runat="server"> </asp:TextBox>
<ajaxToolkit:Au toCompleteExten der ID="AutoComplet eExtender1"
runat="server"
TargetControlID ="txtName"
ServicePath="~/Services/AutoCompleteNam e.asmx"
ServiceMethod=" GetCompletionLi st"
MinimumPrefixLe ngth="3" CompletionSetCo unt="10" >
</ajaxToolkit:Aut oCompleteExtend er>

******* *************** *

[WebService(Name space = "http://tempuri.org/")]
[WebServiceBindi ng(ConformsTo = WsiProfiles.Bas icProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX,
uncomment the following line.
// [System.Web.Scri pt.Services.Scr iptService]
public class AutoCompleteNam e : System.Web.Serv ices.WebService {

public AutoCompleteNam e () {

//Uncomment the following line if using designed components
//InitializeCompo nent();
}

[WebMethod]
public string[] GetCompletionLi st(string prefixText, int count)
{
List<NamenameCo llection = Name.GetNames(p refixText, count);
List<stringname s = null;
foreach (Name name in nameCollection)
{
names.Add(name. surename);
}
return names.ToArray() ;
}

}

could it be caused by this: ServicePath="~/Services/AutoCompleteNam e.asmx"
in the video source code it is ServicePath="Au toCompleteName. asmx", but
I've created a subfolder for my .asmx files just in case my project will
have more .asmx files. I thought it was a nice way of keeping the project
tidy, not having everything in the root folder.....

any suggestions?
Don't you need to uncomment the ScriptService attribute?

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name

Nov 21 '08 #2
thanks that solved the problem
Nov 21 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3323
by: Bill | last post by:
For my personal use I am accessing a railway timetable page, parsing its contents and then sending brief relevant information as the subject line of an email to be read on a mobile phone. The problem comes when I try to parse a second page, the url of which, I have derived from an initial page. I cannot go directly to the second (target) page but from the initial page derive the url and put it in a string called $strTarget In one...
1
6968
by: Steve Allgood | last post by:
I'm having trouble posting a form at the USPS web site. I've been successful using urllib at other sites, but I'm missing why this won't work: # begin code # get zip+4 import urllib def zip4query():
3
52206
by: Jason | last post by:
I am having trouble using the CONTAINS function in sql server(enterprise manager). I am typing the following: Select * FROM mytable WHERE CONTAINS(myfield,'mystring') This returns the error: Query Designer encountered a MS Design Tools error:
2
2707
by: Matthias Kaeppler | last post by:
Hello, I am having trouble getting std::equal_range to perform as I wish, and I can't find my error. Here's the situation: I have a vector of pointers to filesystem path objects (a file list, basically). This vector is partitioned each time the file list was rebuilt into paths which are directories and paths which are not. The directories comes first.
6
1698
by: Gary Morris | last post by:
Hi all, I tried posting this through a free news server, but it still has not appeared in Google, so if it turns up again I apologize. I hope someone can help me with this, or at least help me find some information that will help me. If I were not at my wit's end already, I wouldn't even ask. I'm used to doing all of my programming in Windows, but now I have a task to
5
3505
by: tkondal | last post by:
Hi all. I just started looking at Python's ctypes lib and I am having trouble using it for a function. For starters, here's my Python code: from ctypes import*; myStringDLL= cdll.LoadLibrary("myStringDLL.dll");
9
5620
by: Nathan Sokalski | last post by:
I am trying to use the System.Array.ForEach method in VB.NET. The action that I want to perform on each of the Array values is: Private Function AddQuotes(ByVal value As String) As String Return String.Format("'{0}'", value) End Function Basically, I just want to surround each value with single quotes. However, I am having trouble getting this to work using the System.Array.ForEach method. This may be partially because I am not very...
1
1508
by: mikeh3275 | last post by:
I have a header control that I include in my .aspx page. In this control, I'm trying to retrieve a cookie value and store it into a string, but I am receiving an "Object reference not set to an instance of an object." error. Below is the code. Any help is appreciated. Thanks. .aspx page: <%@ Page Language="C#" AutoEventWireUp=true CodeFile="OrderAdmin.aspx.cs" Inherits="_Default" %> <%@ Reference...
1
1508
by: alag20 | last post by:
Hi guys, i am having trouble importing c++ unmanaged dll into C# . Can someone help? Basically i am just trying to create a safearray of strings in c++ and trying to send it to C#. Here is my c++ code. extern "C" __declspec(dllexport) BOOL GetStringArr(SAFEARRAY* arr) { SAFEARRAY* myArray; SAFEARRAYBOUND rgsabound;
0
9599
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
10371
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
9193
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
7650
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
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
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
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.