ASP.NET MVC Interface Controls - Cascading Dropdown List






 



Dropdown List controls can be linked in a cascading manner.
C#
Html.Obout(new OboutDropDownList("DdlCustomers") 
{ 
    AutoPostBack = true,
    OnSelectedIndexChanged = "Interface/DdlCascading_GetOrders",
    Width = 250
})
         
Html.Obout(new OboutDropDownList("DdlOrders") 
{ 
    AutoPostBack = true,
    Enabled = bool.Parse(ViewData["DdlOrders_Enabled"].ToString()),
    OnSelectedIndexChanged = "Interface/DdlCascading_GetOrderItems",
    Width = 250
})
                   
Html.Obout(new OboutDropDownList("DdlOrderItems") 
{
    Enabled = bool.Parse(ViewData["DdlOrderItems_Enabled"].ToString()),
    Width = 250
})