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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:21:56+00:00 2026-05-25T20:21:56+00:00

I have a model that I would like have a mass update page for,

  • 0

I have a model that I would like have a mass update page for, but am having trouble.

My ViewModel:

public class ApproveView
{

    public IEnumerable<MyObject> ObjectList { get; set; }

}

In my view I have:

foreach (var item in Model.ObjectList)
{
    <div>


    <table class="form" width="100%">
        <tr>

            <td>@Html.LabelFor(model => item.Accurate)<br />
            @Html.RadioButtonFor(model => item.Accurate, true) Yes
            @Html.RadioButtonFor(model => item.Accurate, false) No
            @Html.ValidationMessageFor(model => item.Accurate)
            </td>
            <td>
            @Html.LabelFor(model => item.Comments)<br />
            @Html.TextAreaFor(model => item.Comments)<br />
            @Html.ValidationMessageFor(model => item.Comments)
            </td>
        </tr>

    </table>

    @Html.HiddenFor(model => item.ID)
    @Html.HiddenFor(model => item.CreatedOn)
    @Html.HiddenFor(model => item.CreatedBy)
    @Html.HiddenFor(model => item.ModifiedOn)
    @Html.HiddenFor(model => item.ModifiedBy)
   <hr />
}

This loops over my objects and prints the form. The trouble is that all of the fields of the same type have the same name. So, for example, all of my radio buttons are connected and I can only select one.

how do I make the names for each field unique and associated with that object? Am I even on the right track or is there a better way to do this?

  • 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-25T20:21:57+00:00Added an answer on May 25, 2026 at 8:21 pm

    Check this post: http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx

    You need to create editor for your entity.

    Hope it helps.

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

Sidebar

Related Questions

I have an ActiveRecord model that I would like to convert to xml, but
I have a model that looks something like this: public class SampleModel { public
I have a form that edits an instance of my model. I would like
I have a model that is something like this: class Input(models.Model): details = models.CharField(max_length=1000)
I have a model that looks like this: public interface IEntity { int Id
We have a data model that has some requirements. I would like to find
I have a model that I would like to serialize to an xml with
I have a model that I would like to contain a subjects name and
Say I have a model that looks like: class StockRequest(models.Model): amount_requested = models.PositiveIntegerField(null=True) amount_approved
I have a model for Event that I would like to have a user

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.