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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:31:54+00:00 2026-05-13T12:31:54+00:00

In an ASP.NET MVC application I am trying to submit multiple objects with a

  • 0

In an ASP.NET MVC application I am trying to submit multiple objects with a single form. I am able to get simple types to post back but am having issues with complex types. I feel like I have mimicked the example provided by Phil Haack in his blog post Model Binding To A List but with no luck. Even going so far as copying his code exactly to no avail.

I am trying to populate the ProjectNum and TaskNum properties of a set of MachineLicenseBillback objects. Unfortunately the IList<MachineLicenseBillback> machinePts always ends up as a null when posted.

What am I missing?

Class

public class MachineLicenseBillback
{
    public MachineLicenseBillback() { }

    public virtual int MachineId { get; set; }
    public virtual string ProjectNum { get; set; }
    public virtual string TaskNum { get; set; }
    public virtual string VerifiedFlag { get; set; }
    public virtual DateTime? RcdChgDateTime { get; set; }
    public virtual string RcdChgAgent { get; set; }
}

Action

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult TrueUp(int id, IList<MachineLicenseBillback> machinePts)
{
  // ...
}

Form

<% using (Html.BeginForm("TrueUp", "Home", new { id = Model.Customer.Id },
             FormMethod.Post))
   { %>
<input type="hidden" name="machinePts.Index" value="<%= machine.MachineId %>" />

<input type="text" name="machinePts[<%= machine.MachineId%>].ProjectNum"
  value="<%= machine.MachineLicenseBillback.ProjectNum %>" />

<input type="text" name="machinePts[<%= machine.MachineId %>].TaskNum"
  value="<%= machine.MachineLicenseBillback.TaskNum %>" />

<input type="submit" value="Submit" />
<% } %>
  • 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-13T12:31:54+00:00Added an answer on May 13, 2026 at 12:31 pm

    The .Index syntax was removed for MVC 1 RTM and reintroduced in MVC 2. For MVC 1, list elements must be numbered sequentially: machinePts[0], machinePts[1], etc.

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

Sidebar

Related Questions

I have a form within an ASP.NET MVC application and I'm trying to submit
I'm trying to get the MVCToolkit working with an ASP.NET MVC Beta application and
I'm writing an ASP.NET MVC application and trying to use a RESX file to
I have an asp.net mvc application and i am trying to assign value to
I'm trying to unit test a page in my ASP.NET MVC application that, when
I am currently working on my first asp.net mvc application. I am trying to
I'm trying to use route constraints in an Asp.Net MVC Application. routes.MapRoute( theRoute, MyAction/{page},
I am trying to publish an Asp.net MVC web application locally using the NAnt
I'm trying to connect my stock standard, default ASP.NET MVC (web) application to the
I've been trying to use WF in my ASP.NET application (actually, it's ASP.NET MVC

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.