Question : AJAX just doesn't work :(   VS.2008, .NET 2.0, AJAX 1.0

Banging my head against the wall for a few days!

* Target environment for project is .NET 2.0
* ASP.NET 2.0 AJAX Extensions installed on the server and development machine
* AJAX Control Toolkit 1.0 is installed
* A basic webpage containing asp:ScriptManager and cc1:AutoCompleteExtender compiles and loads successfully (that took at day in itself!)
* If I remove AutoCompleteExtender.ServiceMethod or AutoCompleteExtender.TargetControlID then it complains (ie. we're in the right area)
* AJAX-related code appears in the browser's HTML

Symptoms:

* When I run the webpage and type in text, nothing happens!! :(
* The browser doesn't even appear to be loading anything.
* If I change TargetControlID to something non-existent it complains, but if I change ServiceMethod to something non-existent it doesn't care

Any ideas on how to get AJAX Control Toolkit 1.0 working in .NET 2.0 in VS 2008?? I've scoured the internet for answers but I just can't seem to find anything to go on. Code below.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
ASP.NET code:
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="TEST_Default" EnableSessionState="True" %>
<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
 

 


    Untitled Page


    
    



Code Behind code: Public Function GetCompletionList(ByVal prefixText As String, ByVal count As Integer) As System.String() Dim rv As String() = {"asdf", "xasdf"} Return rv End Function And the HTML:



Open in New Window Select All

Answer : AJAX just doesn't work :(   VS.2008, .NET 2.0, AJAX 1.0

Finally got it working. Seems the problem was a bit simpler - the names of the ServicePath/ServiceMethod were wrong, or the methods were generating an internal error.

I corrected the names, and fixed up internal errors and it worked a treat.
Random Solutions  
 
programming4us programming4us