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

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

如何在MVC中的Controller中獲取DropDownList SelectedValue

如何在MVC中的Controller中獲取DropDownList SelectedValue

慕慕森 2019-07-30 15:50:19
如何在MVC中的Controller中獲取DropDownList SelectedValue我有下拉列表,我已從數(shù)據(jù)庫中填寫?,F(xiàn)在我需要在Controller中獲取所選值進行一些操作。但沒有得到這個想法。我試過的代碼。模型public class MobileViewModel {               public List<tbInsertMobile> MobileList;     public SelectList Vendor { get; set; }}調(diào)節(jié)器 public ActionResult ShowAllMobileDetails()     {         MobileViewModel MV = new MobileViewModel();         MV.MobileList = db.Usp_InsertUpdateDelete(null, "", "", null, "", 4, MergeOption.AppendOnly).ToList();         MV.Vendor = new SelectList(db.Usp_VendorList(), "VendorId", "VendorName");         return View(MV);     }     [HttpPost]     public ActionResult ShowAllMobileDetails(MobileViewModel MV)     {                    string strDDLValue = ""; // Here i need the dropdownlist value         return View(MV);     }視圖   <table>                    <tr>             <td>Mobile Manufacured</td>             <td>@Html.DropDownList("ddlVendor", Model.Vendor, "Select Manufacurer") </td>         </tr>                  <tr>             <td>             </td>             <td>                 <input id="Submit1" type="submit" value="search" />             </td>         </tr>     </table>
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 1292 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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