c# - How to pass multi parameters in webservice from radcombobox in asp.net? -
how pass multiple parameters in webmethod radcombobox? use radocombobox use webservice. want pass 2 parameters webmethod. how do it?
<telerik:radcombobox id="radcmbaccountlist" runat="server" cssclass="radctrlcombo h4" enableloadondemand="true" enablevirtualscrolling="true" loadingmessage="در حال دریافت اطلاعات.." width="128px" minfilterlength="1" skin="webblue"> <webservicesettings method="getaccountlist" path="~/services/webservice.asmx" > </webservicesettings> </telerik:radcombobox> [webmethod] public radcomboboxdata getaccountlist(radcomboboxcontext context, int accountid) {}
i want pass accountid webmethod.
the radcomboboxcontext object dictionary. need pass in single parameter context
, in web method can access key/value pairs.
set keys client-side whatever need:
<script type="text/javascript"> function onclientitemsrequesting(sender, eventargs) { var context = eventargs.get_context(); context["accountid"] = 7; context["whatever"] = "test"; } </script> <telerik:radcombobox id="radcombobox1" runat="server" width="300px" enableloadondemand="true" onclientitemsrequesting="onclientitemsrequesting"> <webservicesettings method="getaccountlist" path="~/services/webservice.asmx" /> </telerik:radcombobox>
then access dictionary in web method dictionary.
Comments
Post a Comment