be added under, Now open newly created view How do I import a namespace in Razor View Page? Notice that we are passing a value of 1 for selectedValue parameter. window will open in that enter name of controller and click Add like as shown to get dropdownlist selected value in, we will write the controller to get data from database for that right click on Controller folder You will see how easier things will become. I drilled down the formation of the drop down list instead of using @Html.DropDownList(). To subscribe to this RSS feed, copy and paste this URL into your RSS reader. I have the following DropDownList on a View Layout page that displays languages from an SQL database. While for capturing the Gender value, a DropDownList with three options is created using the Html.DropDownListFor function. The DropDownList will be populated from database using Model class and the Html.DropDownListFor Html Helper method. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. My answer was to solve the exception. Light bulb as limit, to what is current limited to? I'll try to clear up some of your code a bit as well : As far as actually access those values within your Controller Action (which I will assume cooresponds to your