Question

Method Error 500 in AJAX cascading dropdownlist

Asked by: AidenA

So, I'm getting this method error 500. I can see lots of other people have experienced this but whatever fixes they have come up with don't work or maybe i don't understand. The code i use is below. Any ideas?

The query seems ok and when i execute it, it returns 1 value, so presumably that is fine.

Thanks, Aiden

// In my default.aspx page
 
<cc1:CascadingDropDown  ID="CascadingDropDown1" 
                                runat="server" 
                                TargetControlID="ddlQuarter" 
                                Category="Quarter" 
                                PromptText="Please select the Quarter"
                                LoadingText="Please wait..."
                                servicepath="CSATSearchService.asmx"
                                servicemethod="GetCSATData">
                               
        </cc1:CascadingDropDown>
 
<table style="z-index: 112; left: 245px; position: absolute; top: 101px">
            <tr>
                <td style="width: 124px; height: 21px; text-align: right">Quarter:</td>
                <td style="width: 11px; height: 21px"></td>
                <td style="width: 170px; height: 21px">
                    <asp:DropDownList ID="ddlQuarter" runat="server" Width="165px"/>
                </td>
            </tr>
            <tr>
                <td style="width: 124px; text-align: right">Customer:</td>
                <td style="width: 11px"></td>
                <td style="width: 170px">
                    <asp:DropDownList ID="ddlCustomer" runat="server" Width="165px"/>
                </td>
            </tr>
            <tr>
                <td style="width: 124px; text-align: right">Region:</td>
                <td style="width: 11px"></td>
                <td style="width: 170px">
                    <asp:DropDownList ID="ddlRegion" runat="server" Width="165px"/>
                </td>
            </tr>
        </table>
 
// In my webservice.asmx page
 
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports AjaxControlToolkit
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic
 
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<System.Web.Script.Services.ScriptService()> _
Public Class CSATSearchService
   Inherits System.Web.Services.WebService
 
   <WebMethod()> _
   Public Function GetCSATData(ByVal knowncategoryvalues As String, ByVal Category As String) As CascadingDropDownNameValue()
 
      'took out shared
 
      Dim quarterAdapter As New CSATSearchTableAdapters.CSAT_DataTableAdapter
      Dim quarterValues As New List(Of CascadingDropDownNameValue)()
 
      For Each row As DataRow In quarterAdapter.GetQuarter
         quarterValues.Add(New CascadingDropDownNameValue(row("Quarter").ToString, row("Customer Name").ToString))
      Next
 
      Return quarterValues.ToArray
 
   End Function
 
End Class
 
// my xsd page. Query appears to run fine and only returns 1 value so can't be an overflow problem
 
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="CSATSearch" targetNamespace="http://tempuri.org/CSATSearch.xsd" xmlns:mstns="http://tempuri.org/CSATSearch.xsd" xmlns="http://tempuri.org/CSATSearch.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="CSAT DatabaseConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="CSAT DatabaseConnectionString (Web.config)" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.CSAT DatabaseConnectionString.ConnectionString" Provider="System.Data.OleDb">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CSAT DataTableAdapter" GeneratorDataComponentClassName="CSAT_DataTableAdapter" Name="CSAT Data" UserDataComponentName="CSAT DataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="CSAT DatabaseConnectionString (Web.config)" DbObjectName="CSAT Data" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="False" GeneratorGetMethodName="GetQuarter" GetMethodModifier="Public" GetMethodName="GetQuarter" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetQuarter" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT DISTINCT Quarter
FROM         [CSAT Data]</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Quarter" DataSetColumn="Quarter" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="CSATSearch" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="CSATSearch" msprop:Generator_DataSetName="CSATSearch">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="CSAT_x0020_Data" msprop:Generator_UserTableName="CSAT Data" msprop:Generator_RowDeletedName="CSAT_DataRowDeleted" msprop:Generator_TableClassName="CSAT_DataDataTable" msprop:Generator_RowChangedName="CSAT_DataRowChanged" msprop:Generator_RowClassName="CSAT_DataRow" msprop:Generator_RowChangingName="CSAT_DataRowChanging" msprop:Generator_RowEvArgName="CSAT_DataRowChangeEvent" msprop:Generator_RowEvHandlerName="CSAT_DataRowChangeEventHandler" msprop:Generator_TablePropName="CSAT_Data" msprop:Generator_TableVarName="tableCSAT_Data" msprop:Generator_RowDeletingName="CSAT_DataRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Quarter" msprop:Generator_UserColumnName="Quarter" msprop:Generator_ColumnPropNameInRow="Quarter" msprop:Generator_ColumnVarNameInTable="columnQuarter" msprop:Generator_ColumnPropNameInTable="QuarterColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="255" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>

                                  
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:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-05-28 at 07:19:00ID24445103
Tags

AJAX ASP Webprogramming

Topics

Asynchronous Javascript and XML (AJAX)

,

Programming for ASP.NET

,

Web Services and WCF

Participating Experts
1
Points
250
Comments
9

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. SQL Query: ON UPDATE CASCADE
    it seems Access doesn't like: "CREATE TABLE tbl_Style (ID AUTOINCREMENT CONSTRAINT bla PRIMARY KEY, Header1 INTEGER CONSTRAINT C1 REFERENCES tbl_Logo (ID) ON UPDATE CASCADE)" It just gives me the 'error in create statement' and points to the update keyword. (same t...
  2. dropdownlist
    Hi , I have a drop downlist in a detailsview called Active . I want to set the list as 'Y' or 'N' I have written this code . But it would only show the default value 'Y' at runtime. It would not show the value 'N'. Please look at the code below and help me in resolvi...
  3. Cascading dropdownlist doesn't work properly using jQuery
    Dear Experts, I am trying to do cascading drop-down-list. When I select division combo, its related district will be populated in district combo. Similarly, when I click district combo, its related than will be populated in thana combo. But it generated following error: Erro...
  4. DropDownList
    Hi, I have 3 DropDownList Server controls named OSList, NetworkList, and RAMList. My CodeBehind consists of a Function that binds the results from the SelectedItem.Value of the DropDownLists to the GridView. The problem that I am having is that I can not just select 1 value...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: moghazaliPosted on 2009-05-28 at 07:45:10ID: 24493785

I think you need to take equal number of CascadingDropDown controls as the number of DropDownList controls involved. Check the attached zip file which contains the official sample of CDD (I could not attach the file due to EE limitation, so pasting the file in code snippet):

<%@ Page
    Language="C#"
    MasterPageFile="~/DefaultMaster.master"
    AutoEventWireup="true"
    CodeFile="CascadingDropDown.aspx.cs"
    Inherits="CascadingDropDown_CascadingDropDown"
    Title="CascadingDropDown Sample"
    EnableEventValidation="false"
    Theme="SampleSiteTheme" %>
<%@ Register
    Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="ajaxToolkit" %>
<asp:Content ContentPlaceHolderID="SampleContent" Runat="Server">
    <ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true" runat="server" ID="ScriptManager1" />
    <div class="demoarea">
        <div class="demoheading">CascadingDropDown Demonstration</div>
        <table>
            <tr>
                <td>Make</td>
                <td><asp:DropDownList ID="DropDownList1" runat="server" Width="170" /></td>
            </tr>
            <tr>
                <td>Model</td>
                <td><asp:DropDownList ID="DropDownList2" runat="server" Width="170" /></td>
            </tr>
            <tr>
                <td>Color</td>
                <td><asp:DropDownList ID="DropDownList3" runat="server" Width="170" AutoPostBack="true"
                    OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged" /></td>
            </tr>
        </table>
        <br />
        
        <ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1"
            Category="Make"  PromptText="Please select a make"  LoadingText="[Loading makes...]"
            ServicePath="CarsService.asmx" ServiceMethod="GetDropDownContents" />
        <ajaxToolkit:CascadingDropDown ID="CascadingDropDown2" runat="server" TargetControlID="DropDownList2"
            Category="Model" PromptText="Please select a model" LoadingText="[Loading models...]"
            ServiceMethod="GetDropDownContentsPageMethod" ParentControlID="DropDownList1" />
        <ajaxToolkit:CascadingDropDown ID="CascadingDropDown3" runat="server" TargetControlID="DropDownList3"
            Category="Color" PromptText="Please select a color" LoadingText="[Loading colors...]"
            ServicePath="~/CascadingDropDown/CarsService.asmx" ServiceMethod="GetDropDownContents"
            ParentControlID="DropDownList2" />
      
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="inline">
            <ContentTemplate>
                <asp:Label ID="Label1" runat="server" Text="[No response provided yet]" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="DropDownList3" EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    <div class="demobottom"></div>
    
    <asp:Panel ID="Description_HeaderPanel" runat="server" style="cursor: pointer;">
        <div class="heading">
            <asp:ImageButton ID="Description_ToggleImage" runat="server" ImageUrl="~/images/collapse.jpg" AlternateText="collapse" />
            CascadingDropDown Description
        </div>
    </asp:Panel>
    <asp:Panel id="Description_ContentPanel" runat="server" style="overflow:hidden;">
        <p>
            CascadingDropDown is an ASP.NET AJAX extender that can be attached to an ASP.NET DropDownList
            control to get automatic population of a set of DropDownList controls.  Each time the selection
            of one the DropDownList controls changes, the CascadingDropDown makes a call to a specified web
            service to retrieve the list of values for the next DropDownList in the set.
        </p>
        <br />
        <p>
            CascadingDropDown enables a common scenario in which the contents of one list depends on the
            selection of another list and does so without having to embed the entire data set in the page or
            transfer it to the client at all.  All the logic about the contents of the set of DropDownList
            controls lives on the server in a web service.  This web service can use any suitable method for
            storing and looking up the relevant data.  The sample web service used here reads the data set
            from a simple hierarchical XML data file.  The sample data file shows that the DropDownList items
            can have distinct names and value (values are optional in the sample).  There is also a walkthrough
            showing how to use a <a href="../Walkthrough/CCDWithDB.aspx">CascadingDropDown with a database</a>.
        </p>
    </asp:Panel>
 
    <asp:Panel ID="Properties_HeaderPanel" runat="server" style="cursor: pointer;">
        <div class="heading">
            <asp:ImageButton ID="Properties_ToggleImage" runat="server" ImageUrl="~/images/expand.jpg" AlternateText="expand"   />
            CascadingDropDown Properties
        </div>
    </asp:Panel>
    <asp:Panel id="Properties_ContentPanel" runat="server" style="overflow:hidden;" Height="0px">
        <p>
            The control above is initialized with this code. The <em>italic</em> properties are optional:
        </p>
<pre>&lt;ajaxToolkit:CascadingDropDown ID="CDD1" runat="server"
    TargetControlID="DropDownList2"
    Category="Model"
    <em>PromptText</em>="Please select a model"
    <em>LoadingText</em>="[Loading models...]"
    <em>ServicePath</em>="CarsService.asmx"
    ServiceMethod="GetDropDownContents"
    <em>ParentControlID</em>="DropDownList1"
    <em>SelectedValue</em>="SomeValue" /&gt;</pre>
        <ul>
            <li><strong>TargetControlID</strong> - The ID of the DropDownList to populate.</li>
            <li><strong>Category</strong> - The name of the category this DropDownList represents.</li>
            <li><strong>PromptText</strong> - Optional text to display before the user has selected a value from the DropDownList.</li>
            <li><strong>PromptValue</strong> - Optional value set when PromptText is displayed.</li>
            <li><strong>EmptyText</strong> - Optional text to display when the DropDownList has no data to display.</li>
            <li><strong>EmptyValue</strong> - Optional value set when EmptyText is displayed.</li>
            <li><strong>LoadingText</strong> - Optional text to display while the data for the DropDownList
                is being loaded.</li>
            <li><strong>ServicePath</strong> - Path to a web service that returns the data used to populate
                the DropDownList. This property should be left null if ServiceMethod refers to a page method.
                The web service should be decorated with the System.Web.Script.Services.ScriptService
                attribute.</li>
            <li><strong>ServiceMethod</strong> - Web service method that returns the data used to populate
                the DropDownList.  The signature of this method must match the following:
<pre>
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public CascadingDropDownNameValue[] GetDropDownContents(
       string knownCategoryValues, string category) { ... }</pre>
                Note that you can replace "GetDropDownContents" with a naming of your choice, but the return
                type and parameter name and type must exactly match, including case.</li>
            <li><strong>ContextKey</strong> - User/page specific context provided to an optional overload of the
                web method described by ServiceMethod/ServicePath.  If the context key is used, it should have the
                same signature with an additional parameter named contextKey of type string:
                <pre>
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public CascadingDropDownNameValue[] GetDropDownContents(
       string knownCategoryValues, string category, string contextKey) { ... }</pre>
                Note that you can replace "GetDropDownContents" with a name of your choice, but the return type
                and parameter name and type must exactly match, including case.</li>
            <li><strong>UseContextKey</strong> - Whether or not the ContextKey property should be used.  This
                will be automatically enabled if the ContextKey property is ever set (on either the client or
                the server).  If the context key is used, it should have the same signature with an additional
                parameter named contextKey of type string (as described above).</li>
            <li><strong>ParentControlID</strong> - Optional ID of the parent DropDownList that controls the
                contents of this DropDownList.</li>
            <li><strong>SelectedValue</strong> - Optional value to select by default.  This needs to exactly
                match the string representation of a value in the DropDownList.</li>
        </ul>
    </asp:Panel>
    
    <ajaxToolkit:CollapsiblePanelExtender ID="cpeDescription" runat="Server" 
        TargetControlID="Description_ContentPanel"
        ExpandControlID="Description_HeaderPanel"
        CollapseControlID="Description_HeaderPanel"
        Collapsed="False"        
        ImageControlID="Description_ToggleImage" />
    <ajaxToolkit:CollapsiblePanelExtender ID="cpeProperties" runat="Server" 
        TargetControlID="Properties_ContentPanel"
        ExpandControlID="Properties_HeaderPanel"
        CollapseControlID="Properties_HeaderPanel"
        Collapsed="True"        
        ImageControlID="Properties_ToggleImage" />
</asp:Content>

                                              
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:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:

Select allOpen in new window

 

by: AidenAPosted on 2009-05-28 at 08:14:27ID: 24494175

why would you need the same number of cascading dropdown lists? I'm not sure that makes sense... i could have many dropdownlists on my page that have nothing to do with the cascading dropdownlists so having to have the same number of cascading dropdown lists i'm not sure makes sense?

Plus, i have just been following the AJAX video and trying to adapt my scenario. The author only dropped one cascadingdropdown control onto his page to begin with... then he runs his code and it is fine. Yeah i just checked again... he definitely doesn't add his second cascading dropdown list control until after he has fully implemented the first cascading dropdownlist

i don't think that can be the problem?

 

by: moghazaliPosted on 2009-05-28 at 08:52:31ID: 24494627

As per the sample, the second DDL need to know the parent DDL so that it could appropriately clear/update the list-contents based upon the change in the first DDL.

 

by: AidenAPosted on 2009-05-28 at 09:06:41ID: 24494783

sorry, i don't understand. I haven't gotten that far yet. If you look at the AJAX video on cascading dropdownlists, the author also does not implement the 2nd cascading dropdownlist... you see what I'm saying? He does NOT implement the second dropdownlist, does not even have a second one on his page. He puts it on AFTER he FULLY implements the first dropdownlist. The 2nd one does do anything, it is not attached to anything etc etc...

 

by: moghazaliPosted on 2009-05-28 at 09:16:22ID: 24494907

Can you please post the link to the video? In the mean time, I'll try looking into your code once again.

 

by: AidenAPosted on 2009-05-28 at 09:30:15ID: 24495082

thanks moghazali,

the video is http://www.asp.net/learn/ajax-videos/video-278.aspx

(it is called 'Use ASP.NET AJAX Cascading Drop Down Control to Access a Database')

 

by: moghazaliPosted on 2009-05-28 at 10:00:16ID: 24495396

As I mentioned and pointed earlier it is due to the reason of missing CCD controls. The video you pointed were of the days of ATLAS version when ASP.NET AJAX was in Beta. After it matured the case was changed and hence I pointed you to the official sample file which uses same number of CCDs as of DDLs..

For more confirmation to the problem, please see this link and I am hopeful that you would be able to solve the problem: http://forums.asp.net/p/1051586/1486888.aspx#1486888

Hope this helps.

 

by: AidenAPosted on 2009-05-29 at 04:33:33ID: 24501876

ok i will look again at this. maybe i don't understand what you mean exactly. I mean, i understand that you need the same number of cascading ddls as dropdownboxes... and they also do in the AJAX video... but, he doesn't need to implement all of them for it to work until the end. i.e. he can implement the first.. test it, then add the second, test it then add the third... etc

And anyway, lets say i had 10 ddls on my page, but only 3 of them were to be used as a cascading dropdownlist, then i would still only need 3 cascading dropdown controls... so just because i have many ddls on my page does not mean i need many cascading dropdown controls also... it is only if i wish to use them as a cascading dropdown list. Otherwise they will just sit there and do nothing until i implement them.

Anyway, let me look at the link and see if i can figure out what you mean... maybe you can see where i'm getting confused also then

 

by: AidenAPosted on 2009-05-29 at 08:12:54ID: 24503335

aaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

i figured it out...

that was so much more complicated then i thought it would be. Ok, so, I was looking at another post under (http://forums.asp.net/p/1029309/1409070.aspx) and it seems that all sorts of things can cause this error... or, it seems maybe an error in the asmx page causes this. But... VS for some reason doesn't debug this asmx page (or at least whatever settings I had on it doesn't).

So, at the end of that post someone mentions to download something called fiddler which is a web debugging tool. Usually these things require some kind of degree in brain surgery and rocket science combined, but actually this was pretty easy to follow.

I turned on fiddler, ran my application and you can see some requests coming though. One of them was in Red, so this seemed to be the problem. I clicked on that and the following error appeared:

{"Message":"Column \u0027Company Name\u0027 does not belong to table CSAT Data.","StackTrace":"   at System.Data.DataRow.GetDataColumn(String columnName)\r\n   at System.Data.DataRow.get_Item(String columnName)\r\n   at CSATSearchService.GetCSATData(String knownCategoryValues, String category) in E:\\My Documents\\Visual Studio 2005\\WebSites\\CSAT Database\\App_Code\\CSATSearchService.vb:line 22","ExceptionType":"System.ArgumentException"}

So, the reason was to do with my sql query for the ddl. In fact, the column customer name was not in my dataset returned by the sql query, i'd made a mistake there. it works fine now

so actually it had nothing to do with there not be 3 cascading ddl controls as i thought in fact. but thanks for your help anyway... i'll give some marks for the effort!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...