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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:53:50+00:00 2026-06-02T04:53:50+00:00

Lets say I have a partial view that contains both a checkbox and a

  • 0

Lets say I have a partial view that contains both a checkbox and a numerical value.
I have a ViewModel that contains a Model — Terms — that implements the partial view. When I submit it, the modifications made in the Terms Partial View does not reflect to the Terms property of ViewModel. I’m probably misunderstanding a concept or another on how it works, anyone care to point it out please?

View

@model ViewModel
@using (Html.BeginForm("ViewAction", "ViewController", FormMethod.Post))
{
 // Other ViewModel Property Editors

 @Html.Partial("Terms", Model.Terms)
 <input type="submit" value="Submit" />
}

Partial View

@model Terms

@Html.CheckBoxFor(m => m.IsAccepted)
@Html.EditorFor(m => m.NumericalValue)

Controller

[AcceptVerbs(HttpVerbs.Get)]
public ActionResult ViewAction(int id)
{
 ViewModel vm = GetVmValues();
 return View(vm);
}

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult ViewAction(ViewModel vm)
{
 // Access ViewModel properties
}
  • 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-02T04:53:53+00:00Added an answer on June 2, 2026 at 4:53 am

    The default model binder expects the control ids for your Terms model to be named Terms.IsAccepted and Terms.NumericalValue. You need to create an editor template for your Terms model and then call @Html.EditorFor(m=> m.Terms) instead of using a partial.

    You can read more about editor templates here. Its from MVC 2, but should still be relevant.

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

Sidebar

Related Questions

Lets say I have a checkbox with id 'test' and its on a page
Lets say I have a lat lng coordinate and I want to place that
Let's say I have a javascript slide-show in a partial view... _Slideshow.cshtml: @{ ViewBag.Title
I have a partial that is used in several views. The partial contains forms.
I have a partial view that is been used in several places in the
Lets say I have a class that is doing something like: public class Foo
Lets say have this immutable record type: public class Record { public Record(int x,
Lets say I have an abstract base class and a derived class with some
lets say i have a class defined as shown below. Lets now say i
Lets say I have three divs in my HTML <div> <h2>This is div 1</h2>

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.