在我的Asp.Net MVC項目中,我有兩個下拉列表。我的看法(剃鬚刀)看起來像:Asp.Net Mvc隱藏下拉列表
@{
string birth_Date = null;
@Html.DropDownListFor(model => model.Birth_Date,
new SelectList((System.Collections.IEnumerable)DoctorDatawarehouse.Business.CommonChoiceList.LoadYearList(), "Value", "Text", birth_Date))
}
@{
string temp_birth_date = null;
@Html.DropDownListFor(model => model.Town,
new SelectList((System.Collections.IEnumerable)DoctorDatawarehouse.Business.CommonChoiceList.LoadEstimatedYear(), "Value", "Text", temp_birth_date))
}
我想只顯示一個下拉。如果我沒有從第一個下拉列表中選擇,我想顯示第二個下拉列表,我想隱藏第一個下拉列表。
謝謝你這麼多
你能不能說清楚?首先,從不選擇/選擇第一個下拉菜單。所以它會一直顯示第二個下拉菜單。 – mrsrizan 2014-09-23 08:03:32
您應該至少指定您正在編程的語言......是C#嗎? 。淨?紅寶石?視覺渦輪超Z + +親? – AJPerez 2014-09-23 08:06:02
您可以放置複選框並切換下拉列表的可見性。那有意義嗎? – mrsrizan 2014-09-23 08:06:43