We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

mvc2 - Post value from html dropdown in form post to controller

ToString1
ToString1 asked
on
Medium Priority
856 Views
Last Modified: 2013-11-08
I have an ascx search control on a masterpage on an mvc2 app.  It comprises of a dropdown to select an option and then click input button.

However I cannot get it to post the selected value to the controller, what am I doing wrong


<% using (Html.BeginForm("actionName", "controllerName"))
 { %>

 <%= Html.DropDownListFor(x => x.CustomerSelectList, Model.CustomerSelectList)%>

///
   <input type="Submit" id="cust" value="Search" />
Comment
Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks Dima!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.