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

  • Home
  • SEARCH
  • 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 7409899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:09:05+00:00 2026-05-29T06:09:05+00:00

would like to put fieldSets side-by-side on my Edit page because I have so

  • 0

would like to put fieldSets side-by-side on my “Edit” page because I have so many fields on the page. Since I couldn’t find an easy fix, I decided to put the fields in a table. This worked fine except for when I click on the “Save” button I get this error:

“Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries.”

Questions: How can I put my fieldsets side-by-side or make my table to work with the save button?

Thanks for any help.

Here’s the edit methods of my controller:

    public ActionResult Edit(int id)
    {
      CourseProgress courseprogress = db.CourseProgresses.Find(id);
      ViewBag.CourseId = new SelectList(db.Courses, "CourseId", "Name", courseprogress.CourseId);
      ViewBag.TeacherId = new SelectList(db.Teachers, "TeacherId", "Name", courseprogress.TeacherId);
      var PdfReportProperties = new PdfReport();

        return View(courseprogress);
    }

    //
    // POST: /ProgressManager/Edit/5

    [HttpPost]
    public ActionResult Edit(CourseProgress courseprogress)
    {
        if (ModelState.IsValid)
        {
            db.Entry(courseprogress).State = EntityState.Modified;
            db.SaveChanges();

            return RedirectToAction("ProgressRecord");
        }
        ViewBag.CourseId = new SelectList(db.Courses, "CourseId", "Name", courseprogress.CourseId);
        ViewBag.TeacherId = new SelectList(db.Teachers, "TeacherId", "Name", courseprogress.TeacherId);

        return View(courseprogress);
    }
  • 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-29T06:09:05+00:00Added an answer on May 29, 2026 at 6:09 am

    The most likely reason you are getting that error is that as you don’t have a field for the ID of your model in the form, once you hit the SAVE button, the object you are editting has its ID property in null.

    To solve it, use a hidden field holding the ID of the model, so that once the form post its fields it became mapped in your controller model object.

    This problem has nothing to do with the position or layout of your fields.

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

Sidebar

Related Questions

I would like to put a reflection over the entire page. I have a
I would like to put a placeholder into e.g. the footer.html and have it
I have a string and I would like to put a reference to that
I have a website and I would like to put a DIV above this
I would like to put on our company intranet page the number of days
I have some sql queries that I would like to put in a .txt
I have a OVG video and I would like to put that into my
I would like to put an ajax call within a function since I use
I would like to put a string into a byte array, but the string
I would like to put a link to a webpage in an alert dialog

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.