473,386 Members | 1,830 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,386 software developers and data experts.

AJAX CascadingDropdown not calling webservice

I am just trying to populate 1 DropDownList with values from my web service using the CascadingDropdown AJAX control.

Here is my page:
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default"  EnableEventValidation="false" %>
  2.  
  3. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
  4.  
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6.  
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head runat="server">
  9.     <title>CDD TEST</title>
  10. </head>
  11. <body>
  12.     <form id="form1" runat="server">
  13.     <div>
  14.         <asp:ScriptManager ID="ScriptManager1" runat="server" />
  15.  
  16.         <asp:DropDownList ID="ddlMonths" runat="server" />
  17.  
  18.         <asp:CascadingDropDown ID="ccdMonths" runat="server" 
  19.         TargetControlID="ddlMonths"
  20.         Category="Months" 
  21.         PromptText="Select a month" 
  22.         LoadingText="Loading..."
  23.         ServicePath="ddlService.asmx" 
  24.         ServiceMethod="GetMonths">
  25.         </asp:CascadingDropDown>
  26.     </div>
  27.     </form>
  28. </body>
  29. </html>
  30.  
And here is the web service code

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Services;
  6. using System.Collections.Specialized;
  7. using AjaxControlToolkit;
  8.  
  9.  
  10. [WebService(Namespace = "http://tempuri.org/")]
  11. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  12. [System.Web.Script.Services.ScriptService]
  13. public class ddlService : System.Web.Services.WebService {
  14.  
  15.     public ddlService () {
  16.  
  17.         //Uncomment the following line if using designed components 
  18.         //InitializeComponent(); 
  19.     }
  20.  
  21.     [WebMethod]
  22.     public CascadingDropDownNameValue[] getMonths(string knownCategoryValues,string category)
  23.     {
  24.         List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>();
  25.  
  26.         values.Add(new CascadingDropDownNameValue("January", "1", true));
  27.         values.Add(new CascadingDropDownNameValue("February", "2"));
  28.         values.Add(new CascadingDropDownNameValue("March", "3"));
  29.         values.Add(new CascadingDropDownNameValue("April", "4"));
  30.         values.Add(new CascadingDropDownNameValue("May", "5"));
  31.         values.Add(new CascadingDropDownNameValue("June", "6"));
  32.         values.Add(new CascadingDropDownNameValue("July", "7"));
  33.         values.Add(new CascadingDropDownNameValue("August", "8"));
  34.         values.Add(new CascadingDropDownNameValue("September", "9"));
  35.         values.Add(new CascadingDropDownNameValue("October", "10"));
  36.         values.Add(new CascadingDropDownNameValue("November", "11"));
  37.         values.Add(new CascadingDropDownNameValue("December", "12"));
  38.  
  39.         return values.ToArray();
  40.     }
  41.  
  42. }
  43.  
When I run the project, the DropDownList is empty. When I set a breakpoint in the webservice, nothing happens.. so it looks like it's not being called.

Has anyone else run into this problem? T
May 7 '10 #1

✓ answered by xMetalDetectorx

Problem solved.

I removed my reference to AjaxControlToolkit.dll, and added it again. That fixed it......

1 3378
Problem solved.

I removed my reference to AjaxControlToolkit.dll, and added it again. That fixed it......
May 7 '10 #2

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

Similar topics

0
by: Det | last post by:
Hi there I am somewhat stuck with calling a WebService from out of a VB App. My Goal: - Get a WebService invoked under MS - Access 2002, not using the MS-SOAP-Toolkit but the .net - Framework ...
3
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it...
3
by: Henrik | last post by:
Hi all,,, I need to get a refferece to a XML-webservice, and get some data from it.... But I can't add it like an web-refference... What options does I else have?? I've been told that i've to...
2
by: Ramya A | last post by:
Hi All: I have a .NET webservice accepting an XML request document as a parameter How do I call this webservice with ServerXMLHTTP object from my VB6.0 client? I have enabled the HttpPost...
3
by: Zeez | last post by:
Hi all, I have a webpage that calls a webservice found on a remote computer. Below is the code of my webpage: ===================================== <html> <head> <script...
2
by: Frank | last post by:
Hi, Newbie wondering if it is possible to call an ASP.NET 2.0 WebService from javascript that isn't served up on the same server? For example, I would like to call the WebService using an...
5
by: Bilwin | last post by:
Hi , Is it possible to call a webservice method through AJAX.? If possible how can i do this? Thanks!
3
by: =?Utf-8?B?R2FyeSBM?= | last post by:
I've implemented a cascadingdropdown modeling the examples found on the web and that work fine on an initial data entry screen. What I can't seem to find an example of is after I've stored data...
2
by: oziris | last post by:
Hi, I'm under Java and I'm looking for a JavaScript framework which simplify WebService comsumption from JavaScript scriptings. I tried the great Microsoft Ajax Library but it seems strongly...
2
by: Jay | last post by:
Getting into AJAX using the XMLHttp object and am really liking it. We are in the process of upgrading our existing behavior calls (webservice.htc) to the more 'supported', as they say, concept...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.