Hi @WebSpider ,
As far as I think,you could use the ContextKey to pass the additional parameter.You need to do like this:
- Set UseContextKey property on the CascadingDropDown to true
- Change the method signature of your webmethod to accept the contextKey parameter:
-
Public Function GetParentCategory(ByVal knownCategoryValues As String, ByVal category As String,ByVal contextKey As String) As CascadingDropDownNameValue()
-
- Set the ContextKey using JavaScript/Jquery. The AJAX CascadingDropDown exposes getter/setter for this property in the DOM:
-
document.getElementById('Label1').set_contextKey('valueyouwant');
<cc1:CascadingDropDown ID="cdd_category_parent" runat="server" Enabled="false" category="ParentCat" loadingtext="loading..."
promptvalue="Select a parent category" servicemethod="GetParentCategory"
servicepath="/webservices/category.asmx" targetcontrolid="ddl_category_parent">
</cc1:CascadingDropDown> -
Javascript:
<s cript type="text/javascript">
function CategoryChanged() {
$find('<%=Label1.ClientID%>').set_contextKey($get("<%=Label1.ClientID %>").value);
}
</script>
Code-behind:
<WebMethod()> _
Public Function GetParentCategory(ByVal knownCategoryValues As String, ByVal contextKey As String) As CascadingDropDownNameValue()
......
End Function
Best regards,
Yijing Sun
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.