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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:31:11+00:00 2026-06-04T17:31:11+00:00

I have a bound list using knockoutjs / mvc3 <div data-bind=foreach: phones> <input data-bind=’value:

  • 0

I have a bound list using knockoutjs / mvc3

<div data-bind="foreach: phones">
   <input data-bind='value: number' />
</div>

to send this to my controller action which is

[HttpPost]
public ActionResult Index([Deserialize] WizardModel wizard, IStepViewModel step)
{
}

Previously I was able to bind to my List< T > using Jquery by specifying the name on the input which would be

 <input name="Phones[0].Name"
              Phones[1].Number etc..

But I’m now im using knockout I’m not clear how this should work. Anyone steer me in the right direction.

Ta

  • 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-04T17:31:12+00:00Added an answer on June 4, 2026 at 5:31 pm

    You can do this using the attr binding in a template or foreach like this assuming your phone numbers are in an observable array.

    <input data-bind='attr: { name: "Phones["+$index()+"].Name"}' />
    

    Im also assuming you are using the latest version of knockout so you can use the $index.

    This will allow you to name the inputs so they work with MVC model binding.

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

Sidebar

Related Questions

Here's the problem: I have a data-bound list of items, basically a way for
I have a data grid in a view that is bound to a List
I have a bound dropdown list populated with a table of names through a
I have a ListBox bound to a list of Items (for arguement, lets say
I have a DataGridView that is bound to a list of objects called BaseChange.
I have a ListBox that is bound to a list of Persons. I want
I have a windows form with DataBound DataGrid on it. Bound to a list
So, I have a ListBox which is bound to a list of business objects,
I have a list view which is bound to a DataTable source. The sorting
I have a ComboBox with a list of objects bound to it. Currently i

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.