Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Method Error 500 - Cascading Drop Downs

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
I am getting the above error when trying to use the AJAX Cascading DropDown. I was told to add an attribute to my Web Service

Code:
<Microsoft.Web.Script.Services.ScriptService()>

For some reason when I type "Microsoft." my intellisense does not pull up Web as the next level. Am I missing something else?

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
No, the CascadingDropDown is one of the controls in the Ajax Tool Kit.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Come on! Help us to help you - give us a URL or something - there are many AJAX toolkits out there when searching on Google.

At present, you're not giving us much to go on.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Sorry. I just thought there was the one from asp.net.

Anyway, I figured out the problem I was having. I have a new problem as I have progressed.

First of all I have two dropdowns. One gets all customer last names in a table. Then the second one is to only show first names with that last name. I am having troubles understanding the knownCategoryValues parm and how to pass the value of the first dropdown to the second one. Here is my WebMethod. If I hardcode my SELECT statement to say WHERE LNAME = a certain name, I get stuff back for my first name.

Code:
  <WebMethod()> _
    Public Function GetFNames( _
                        ByVal knownCategoryValues As String, _
                        ByVal category As String) As CascadingDropDownNameValue()


        Dim values As New _
           System.Collections.Generic.List( _
           Of AjaxControlToolkit.CascadingDropDownNameValue)

        Dim conn As New SqlConnection( "Data Source=KVCSQL;Initial Catalog=Client_KS;Integrated Security=True")
        Dim comm As New SqlCommand("SELECT DISTINCT FNAME, CSNBR " _
                                    & "FROM MASTERFILE ORDER BY FNAME", conn)
        conn.Open()

        Dim reader As SqlDataReader = comm.ExecuteReader

        While reader.Read
            values.Add(New CascadingDropDownNameValue(reader("FNAME") & " " & reader("CSNBR"), reader("CSNBR")))
        End While

        conn.Close()

        Return values.ToArray
    End Function

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Me said:
Is that a .Net control?

You said:

You said:
I just thought there was the one from asp.net

So it [!]IS[/!] a .Net control despite the fact you told us it was not! *sigh*

Anyway - good to see you've got it sorted.

Dan


Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Yeah, sorry about that. I had another issue above. Any thoughts?

Thanks again.

I am having troubles understanding the knownCategoryValues parm and how to pass the value of the first dropdown to the second one. Here is my WebMethod. If I hardcode my SELECT statement to say WHERE LNAME = a certain name, I get stuff back for my first name.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top