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 7873669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:34:56+00:00 2026-06-03T02:34:56+00:00

I think I found a bug in knockout.js in conjuction with the asp.net mvc

  • 0

I think I found a bug in knockout.js in conjuction with the asp.net mvc dropdownlist. When supplying just a list of strings MVC doesn’t render the option values on the select element. Knockout.js won’t update the value because of this. If I use the second html snippet below by explicitly telling it properties it works. Shouldn’t knockout.js read the inner html if the options value isn’t available?

Doesn’t Update

@Html.DropDownListFor(m => m.Grade, new SelectList((IEnumerable<string>)ViewData[Config.ViewData.Grades], Model.Grade), new { data_bind = "value: selectedGrade" })

Updates

@Html.DropDownListFor(m => m.Grade, new SelectList(((IEnumerable<string>)ViewData[Config.ViewData.Grades]).Select(q => new { Text = q, Value = q }), "Value", "Text", Model.Grade), new { data_bind = "value: selectedGrade" })

The first dropdown renders

<select>
<option>K</option>
<option>2</option>
<option>3</option>
</option>

The second dropdown renders

<select>
<option value="K">K</option>
<option value="2">2</option>
<option value="3">3</option>
</option>
  • 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-06-03T02:34:57+00:00Added an answer on June 3, 2026 at 2:34 am

    I’d call it a bug. Please open an issue on Github: https://github.com/SteveSanderson/knockout/issues

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think I've found a bug in ASP.NET MVC controller's parameters population public JsonResult
I think I've just found a really strange bug... But it can just be
I think I found a bug in webkit: FF doesn't have a problem reporting
What if I think, that I found a bug in an open-source-app? What steps
I've found what I think may be a bug with Ivar and Objective-C runtime.
I'm not very used to programming with flags, but I think I just found
I think I have found a bug when setting or getting the Me.Top property
I think I may have found a bug in PHP's crypt() function under Windows.
I found an interesting bug and wanted to know you think. Brief background: I've
I think I've found a bug in IE's (IE8) handling for the for-in javascript

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.