我有模型在mvc剃鬚刀。在這個模型(EcotourismAttractions
)我有一個列表類ParameterList
。過濾器在mvc剃鬚刀DropDownList
我想要有三個DropDownList
篩選項目EntityType
。
首先DropDownList
顯示EntityType
與值1
秒DropDownList
EntityType
與值2
和第三DropDownList
顯示EntityType
與值3
。
對於所有DropDownList
Value
是參數和文本的標題是參數的ID我可以這樣做嗎?
public class EcotourismAttractions
{
public int Id{ get; set; }
public string LatinName{ get; set; }
public List<AreaManagement.Entities.Parameters> ParametersList{ get; set; }
}
public class Parameters {
public int Id { get; set; }
public byte EntityType { get; set; }
public int ParentId { get; set; }
public string Title { get; set; }
}
我們幾乎可以做的一切,但首先請提供一些格式,以您的問題,以便它會成爲易於閱讀。 – RollerCosta
很明顯三個DropDownList基於EntityType值 –
現在好了,編輯完成後。 – RollerCosta