我想在我的asp.net mvc 3應用程序中爲我的dropdownlistbox創建一個partialview。 在我的網頁我有:@ Html.Action for Razor
@Html.Action("PopulateCombo","ComboController")
控制器partialview:
public ActionResult PopulateCombo()
{
//some code here to organise data and maybe some caching
return ItemsForCombo;
}
有一個模板化的下拉框一個更好的辦法?