C# mvc4中大小未知的级联下拉列表?

C# mvc4中大小未知的级联下拉列表?,c#,asp.net,asp.net-mvc,asp.net-mvc-4,razor,C#,Asp.net,Asp.net Mvc,Asp.net Mvc 4,Razor,我有一个问题: MVC4 RAZOR VIEW ENGINE RESTful services - GetCategoriesBySiteId: This method get a JSON with a list of categories - GetChildCategoriesByParent: This method get a JSON with a list of child categories by a parent id category 我的问题是,

我有一个问题:

MVC4
RAZOR VIEW ENGINE
    RESTful services
    - GetCategoriesBySiteId: This method get a JSON with a list of categories
    - GetChildCategoriesByParent: This method get a JSON with a list of child categories by a parent id category
我的问题是,我不知道类别的深度和他的孩子

我需要做的是级联这个用户选择的下拉列表,表单必须接受的唯一类别是用户选择的类别树的最后一个子类别


如何使用Razor view engine在MVC4中执行此操作?

您可以使用ajax填充下拉列表。你试过了吗?我不知道怎么做当我不知道瀑布的深处。。。我是用固定大小的孩子做的,但事实并非如此。