Skip to content

integrationvault/how-to-populate-a-cascading-aspxcombobox-by-using-webmethods-t356687

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files to look at:

How to populate a cascading ASPxComboBox by using WebMethods

[Run Online]

This example explains how to populate a cascading ASPxComboBox by using WebMethods. On the client side, the master ASPxComboBox is subscribed to the SelectedIndexChanged event. When the event is raised, it sends a request to the server by WebMethod. If the request is successful, a child ASPxComboBox is populated with the response object.

On the client side, WebMethod is called by the following code:

PageMethods.GetData(id, OnSuccess);

On the server side, ScriptManager is used with EnablePageMethods set to "True":

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></asp:ScriptManager>

The C# method is marked by WebMethodAttribute:

using System.Web.Services;

[WebMethod]
public static List<Product> GetData(string categoryID) {
        //method code
}




About

.NET, ASP.NET Web Forms, ASPxDataEditors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Classic ASP 57.5%
  • C# 42.5%