Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

pulling a numerical value out of a dropdown box html

$
0
0

Looking for some help on how to pull out a numerical value from a drop down box back into an if statement in a  controller:

Dropdown box:

<div class="form-group"><select class="form-control" name="Role"><option value="">Select your accout type</option><option value="0">optionOne</option><option value="1">otionTwo</option></select></div>
 if (optionOne)
 {
       Users.Role = 2;                
 }

 if(optionTwo)                
 { 
       Users.Role = 3;
 }





Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>