我在 Create 视图中有以下 DropDownList 。我动态填充列表,从其他两个列表级联,并且在发布之前一切顺利。该列表正确填充,我选择了一个郊区。但是,在传递给Create
action 方法的模型上,SuburbId
仍然为 null。这里发生了什么?
<div class="editor-field">
@(Html.Telerik().DropDownListFor(model => model.DetailItem.SuburbId)
.Name("Suburbs")
.Enable(false)
)
</div>
(DetailItem
是视图模型上的一个属性,它包含对数据模型的引用。)