I am trying to populate my RadComboBox from a web service. I have a simple example working in a separate project, but when I paste the same code into my project (same control, same web service), the web service is not called and the combo box is not populated.
What could I be doing that would prevent the web service from being called?
Rick.
What could I be doing that would prevent the web service from being called?
Rick.
In the form: |
<rad:RadComboBox ID="RadComboBox1" |
EnableLoadOnDemand="true" |
Skin="Vista" |
runat="server"> |
<WebServiceSettings Path="../Controls/WebService.cs" Method="GetData" /> |
</rad:RadComboBox> |
WebService: |
<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService" %> |
WebService CodeBehind: |
using System; |
using System.Collections.Generic; |
using System.Linq; |
using System.Web; |
using System.Web.Services; |
using Telerik.Web.UI; |
/// <summary> |
/// Summary description for WebService |
/// </summary> |
[WebService(Namespace = "http://tempuri.org/")] |
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] |
[System.Web.Script.Services.ScriptService] |
public class WebService : System.Web.Services.WebService |
{ |
public WebService() |
{ |
} |
[WebMethod] |
public RadComboBoxData GetData(RadComboBoxContext context) |
{ |
RadComboBoxData result = new RadComboBoxData(); |
List<RadComboBoxItemData> items = new List<RadComboBoxItemData>(); |
for (int i = 0; i < 10; i++) |
{ |
RadComboBoxItemData item = new RadComboBoxItemData(); |
item.Text = "Item " + i.ToString(); |
items.Add(item); |
} |
result.Items = items.ToArray(); |
return result; |
} |
} |