DropList
Controller:
 1   //================下拉框 start=======================================
 2             List<SelectListItem> dropDownLists = new List<SelectListItem>();
 3             SelectListItem dropDownList1 = new SelectListItem();
 4             dropDownList1.Text = "Text Test1";
 5             dropDownList1.Value = "Text Value1";
 6             dropDownLists.Add(dropDownList1);
 7 
 8             SelectListItem dropDownList2 = new SelectListItem();
 9             dropDownList2.Text = "Text Test2";
10             dropDownList2.Value = "Text Value2";
11             dropDownLists.Add(dropDownList2);
12             ViewData["DropDownList"] = dropDownLists;
13             //================下拉框 end==========================================
 
View:
1 <%=Html.DropDownList("DropDownList", (List<SelectListItem>)ViewData["DropDownList"], new { @onclick = "dbClick(this)" })%>

 

RadioButton

 

相关文章:

  • 2021-06-22
  • 2021-06-28
  • 2021-07-19
  • 2022-12-23
  • 2021-08-28
  • 2022-01-01
猜你喜欢
  • 2021-12-30
  • 2021-11-03
  • 2021-09-20
  • 2021-07-29
  • 2022-01-13
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案