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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:43:59+00:00 2026-05-30T16:43:59+00:00

My application needs to do an HTTP post of a table with checkboxes like

  • 0

enter image description here

My application needs to do an HTTP post of a table with checkboxes like in the image above. On the controller side I will need to traverse the table and perform certain operations for each row that was checked.

The things that I need to do are:

  1. Identify whether a row is checked
  2. Get the cell values of a checked row

I have a good understanding on how this will be done in Razor in as far as posting the form is concerned. But I am clueless once I am in my controller’s action method.

Please help. Thanks.

  • 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-30T16:44:00+00:00Added an answer on May 30, 2026 at 4:44 pm

    From what you’ve show, it appears that all you really need in your action method is a collection of ids to identify which “rows” to modify. I’d use a series of checkboxes with values set to the id of the row they represent. Presumably you have some sort of persistence mechanism in which these rows can be looked up or have them cached server side.

    [HttpPost]
    public ActionResult Update( List<int> rowIDs ) // where your checkboxes are named rowIDs
    {
         var messages = DB.Messages.Where( m => rowIDs.Contains( m.ID ) );
         foreach (var message in messages)
         {
            // process the update
         }
    
         DB.SaveChanges();
         return RedirectToAction( "index" ); // display the updated list
    }
    

    Note that it’s more likely that you have a model with the collection of ids as well as some other data representing what “update” to perform. Posting collections can be tricky; you might need to play with the name of the input and/or with hidden indexes if you’re not getting all the data posted back as expected.

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

Sidebar

Related Questions

I need to write a standalone Java application which will have a embedded HTTP
I am currently programming an application that needs to send an http Post request
I need loging all HTTP request (from any application). I have Delphi 7.0. Anybody
I need to disable PUT, DELETE & TRACE HTTP requests on my Application Server,
I need to display a Treeview in my MVC3 application. There will be a
My application needs to be able to post to https and preserve the session
/* Hi Iam developing an application where the BB app needs to post data
My application needs to execute a fairly complicated series of queries against a database.
My application needs to be able to read cookies stored by a page loaded
my application needs multiple jars to work. Since it is a desktop application 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.