第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

跪求大俠幫忙看下這個DropDownList編輯的問題 實在是沒豆了 謝謝!

跪求大俠幫忙看下這個DropDownList編輯的問題 實在是沒豆了 謝謝!

慕容森 2018-12-06 21:51:29
控制器: int etid =int.Parse(EditID); A_CustomerInfoModel model = new A_CustomerInfoModel(); List<A_CustomerInfoModel> list = base.CustomerInfo.GetModelEdit(EditID) as List<A_CustomerInfoModel>; if (list.Count > 0) { foreach (A_CustomerInfoModel item in list) { List<SelectListItem> items = new List<SelectListItem>(); items.Add(new SelectListItem { Text = "Personal", Value = "0" }); items.Add(new SelectListItem { Text = "Company", Value = "1"}); foreach (SelectListItem item_sp in items) { if (item_sp.Value == item.A_CutomerType) { var selectList = new SelectList(items, items[0].Text, items[0].Value, item.A_CutomerType); ViewData["dorplist_sp"] = selectList; } } model.A_Customer_Name = item.A_Customer_Name; model.Homepage = item.Homepage; model.A_province = item.A_province; model.A_city = item.A_city; model.A_Customer_Address = item.A_Customer_Address; model.A_Customer_Post = item.A_Customer_Post; model.A_Contactperson = item.A_Contactperson; model.A_Contacter_Tel = item.A_Contacter_Tel; model.A_IDcardNo = item.A_IDcardNo; model.A_Contacter_fax = item.A_Contacter_fax; model.A_Contacter_email = item.A_Contacter_email; } return View(model); } else { //沒有數(shù)據(jù) return View(); } 視圖代碼: @Html.DropDownList("dorplist_sp", ViewData["dorplist_sp"] as SelectList) 我改成@Html.DropDownList("dorplist_sp")也不行 頁面報錯提示: DataBinding:“System.Web.Mvc.SelectListItem”不包含名為“Personal”的屬性。
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 340 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號