Home > Net > How to access the drop-down menu to select the option value?
How to access the drop-down menu to select the option value?
Time:05-11
@ Html. AntiForgeryToken () @ the for (int I=0; i {
Risk Rating for @ Model. DealSecurities [I] SecurityDescription & lt;/span> @ Html. HiddenFor (m=& gt; M. ealSecurities [I]. Id) @ Html. DropDownListFor (m=& gt; M.R iskRatingList, new SelectList (Model. RiskRatingList, "Id", "Description"), a new {@ class="select - text riskRatingSelecter"})
@ Html. HiddenFor (model=& gt; Model RiskRatingId, new {@ Value="https://bbs.csdn.net/topics/12345"}) } DealBrokerDealerParameterId: @ Model. DealBrokerDealerParameterId @ Html. HiddenFor (m=& gt; M. ealBrokerDealerParameterId)
How can I get in place of "12345" (14) for the above drop-down menu to select the value of the value (value)? thank you
CodePudding user response:
Your drop-down box should have corresponding id, use id to obtain the corresponding drop-down values directly,,, seem to also not line, you this without triggering events, and not the assignment,,, need event linkage