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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:04:18+00:00 2026-05-14T20:04:18+00:00

I’m trying to get a nested model to bind correctly with a nested view

  • 0

I’m trying to get a nested model to bind correctly with a nested view but am not having any luck.

Here is a detailed look

This is the class

public class Foo
{ 
    public AnotherClass AnotherClass { get; set; }
    public string Name { get; set; }
    public ......
}

Inside AnotherClass we have more sub objects such as

public class AnotherClass 
{
    public AThirdClass { get; set; }
}

The third class has the properties that we want to bind to.

public class AThirdClass
{
    public string ImportantString { get; set; }
    public string SecondString { get; set; }
}

The primary view is expecting a class of type Foo. Inside of that View we call the html helper to render the partial view which expects a model of type AnotherClass which we pass in. The call would be

<% Html.RenderPartial("MyPartialView", Model.AnotherClass); %>

Inside the partial view MyPartialView we have text boxes for editing fields in AThirdClass and they are set up like this

<%= Html.TextBox("AThirdClass.ImportantString", Model.AThirdClass.ImportantString) %>

When we post back to the server I’m loosing all the data that was entered in the text box. Is this not supported in MVC 1.0? I am able to use this technique if I don’t have any partial views while still using nested objects?

It looks like in MVC 2.0 you can use the EditorFor HTML helper to do what I need to do however I’m stuck on MVC 1.0.

What am I doing wrong?

  • 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-14T20:04:19+00:00Added an answer on May 14, 2026 at 8:04 pm

    I’ve got a work around for this.

    If you pass the full view model into the partial and then reference the sub objects right from the top model then you will be fine.

    I would still like to hear how anyone else has done this though.

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

Sidebar

Ask A Question

Stats

  • Questions 531k
  • Answers 531k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer <?xml version="1.0" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/paramList"> <xsl:copy> <xsl:for-each-group… May 16, 2026 at 11:46 pm
  • Editorial Team
    Editorial Team added an answer It sounds to me like you are wanting to identify… May 16, 2026 at 11:46 pm
  • Editorial Team
    Editorial Team added an answer Since message isn't grouped, exactly which message from the group… May 16, 2026 at 11:46 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.