Cascadingdropdown working with web methods

Last post 09-26-2006 6:43 PM by Ted Glaza [MSFT]. 1 replies.

Sort Posts:

  • Cascadingdropdown working with web methods

    09-26-2006, 6:23 AM
    • Member
      68 point Member
    • Raj_TheKing
    • Member since 06-26-2006, 5:20 PM
    • Posts 37

    Hi,

     I am using the Cascadingdropdown as below

    <atlasToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server">

    <atlasToolkit:CascadingDropDownProperties TargetControlID="DropDownList1" Category="Principal" PromptText="Please select Principal" LoadingText="[Loading Principals...]" ServiceMethod="GetDropDownContentsPageMethod" />

    <atlasToolkit:CascadingDropDownProperties TargetControlID="DropDownList2" Category="MessageType" PromptText="Please select message type" LoadingText="[Loading Message Types...]" ServicePath="" ServiceMethod="GetDropDownContents1" ParentControlID="DropDownList1" />

    </atlasToolkit:CascadingDropDown>

    <asp:DropDownList ID="DropDownList1" runat="server">

    </asp:DropDownList>

    <asp:DropDownList ID="DropDownList2" runat="server" />

     

    And the code behind is

    <WebMethod()> _

    Public Function GetDropDownContentsPageMethod(ByVal knownCategoryValues As String, ByVal category As String) As AtlasControlToolkit.CascadingDropDownNameValue()

    Dim lobjDAL As VOSS.Integrations.Web.DataAccess.XmlAdmin

    Try

    lobjDAL = New VOSS.Integrations.Web.DataAccess.XmlAdmin

    Return lobjDAL.GetRegions(knownCategoryValues, category)

    Catch ex As Exception

    Return Nothing

    Finally

    lobjDAL = Nothing

    End Try

    End Function

    <WebMethod()> _

    Public Function GetDropDownContents1(ByVal knownCategoryValues As String, ByVal category As String) As AtlasControlToolkit.CascadingDropDownNameValue()

    Dim lobjDAL As VOSS.Integrations.Web.DataAccess.XmlAdmin

    Try

    lobjDAL = New VOSS.Integrations.Web.DataAccess.XmlAdmin

    Return lobjDAL.GetDropDownContents2(knownCategoryValues, category)

    Catch ex As Exception

    Return Nothing

    Finally

    lobjDAL = Nothing

    End Try

     

    Return Nothing

    End Function

     

    Now the first function works and retrieves the values, but the second function does not. I am not using a web service. Do I need to always use a webservice for this. Can both the methods not pick values directly from db?

     

    Pleae assist

    Regards

    Raj

  • Re: Cascadingdropdown working with web methods

    09-26-2006, 6:43 PM
    • Contributor
      4,198 point Contributor
    • Ted Glaza [MSFT]
    • Member since 04-12-2006, 7:51 PM
    • Microsoft
    • Posts 847
    • AspNetTeam
    Hi Raj,

    You should check out FAQ Item #20.

    Thanks,
    Ted
    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (2 items)