Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:45:06+00:00 2026-05-29T09:45:06+00:00

I tried simple dropdownlist in ASP.NET MVC2 but got error below from tryupdatemodel. How

  • 0

I tried simple dropdownlist in ASP.NET MVC2 but got error below from tryupdatemodel.

How to fix this, everthing looks correct ?

view:

   <%= Html.DropDownList("Post24DeliveryPlaces", Model.DeliveryPlace)%>

model:

public IEnumerable<SelectListItem> Post24DeliveryPlaces { get; set; }

public string DeliveryPlace { get; set; }

result:

System.InvalidOperationException: The parameter conversion from type 'System.String' to type 'System.Web.Mvc.SelectListItem' failed because no type converter can convert between these types.  

at System.Web.Mvc.ValueProviderResult.ConvertSimpleType(CultureInfo culture, Object value, Type destinationType)  

 at System.Web.Mvc.ValueProviderResult.UnwrapPossibleArrayType(CultureInfo culture, Object value, Type destinationType)  

at System.Web.Mvc.ValueProviderResult.ConvertTo(Type type, CultureInfo culture)   at System.Web.Mvc.DefaultModelBinder.ConvertProviderResult(ModelStateDictionary modelState, String modelStateKey, ValueProviderResult valueProviderResult, Type destinationType
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:45:07+00:00Added an answer on May 29, 2026 at 9:45 am

    The problem is that your html input is being named Post24DeliveryPlaces and it’s trying to bind a single string to that.

    The Post data is looking like this:

    POST
    {
        Post24DeliveryPlaces = (string)
    }
    

    However, in your model, Post24DeliveryPlaces is an IEnumerable and it can’t convert at string to SelectListItem.

    Html.DropDownList takes the field name as the first parameter. Try changing to this, giving the list of delivery places as the second parameter.

    Html.DropDownList("DeliveryPlace", Model.Post24DeliveryPlaces)
    

    This will generate the Html

    <select name="DeliveryPlace">
        <option value="..">....</option>
        ....
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble with this simple scenario. First, I'm using ASP.NET WebForms. I'm making
I tried a simple example with boost::function. However I got the compiler error said:
I need a simple messagebox in asp.net, I tried the following code. Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), clientScript,<script>javascript:alert('Guest
I tried to call simple Web Method from JSON but I am getting errors.
I tried to make a simple contact form via HTML and PHP but the
I have started using Simple-form and Bootstrap and I have tried to follow this
I tried to write a Neural Network system, but even running through simple AND/OR/NOR
Here I tried simple service program. Start service works fine and generates Toast but
I tried simple stopwatch program from http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ChronometerDemo.html . The following error is coming R.layout.chronometer
I've just tried some simple code from example: $(document).ready(function() { var map = OpenLayers.Map('map-content',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.