This is a migrated thread and some comments may be shown as answers.

Combobox Load on Demand

1 Answer 117 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
E
Top achievements
Rank 1
E asked on 05 Jun 2012, 05:33 PM
I am using a Web Method to fill a telerik combobox that is in a user control. (see http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx ).  I would like to put the Web Method code in the code behind for the user control rather than the mainpage code.   

<telerik:RadComboBox ID="RadComboBox4" runat="server" Width="250px" Height="150px"
                EmptyMessage="Select a Company" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
                EnableVirtualScrolling="true"
>
                
<WebServiceSettings Method="GetCompanyNames" Path="defaultcs.aspx" />
</telerik:RadComboBox>


So for the path, I would like to put: Path = "usercontrol1.ascx" rather than Path = "defaultcs.aspx", but it cannot find the web method.  Is it possible for a user control to call a web method that is in the code behind for the user control?

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 08 Jun 2012, 08:25 AM
Hello,

You can not reference a page method of a web service from a user control. It has to be a web page where it could be defined. You could refer to the following forum for more information: http://forums.asp.net/p/977525/1242935.aspx.

For more information on RadComboBox bound to a web service, you could refer to our online demos, or documentation.

All the best,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
E
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or