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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:51:31+00:00 2026-06-11T04:51:31+00:00

Just trying to use MVCWizard.Wizard from NuGet as part of a multipage Wizard UI.

  • 0

Just trying to use MVCWizard.Wizard from NuGet as part of a multipage Wizard UI.

I have some “parent” model class, with “child” classes as subsections e.g.

public class MainModel
{
public virtual int MainModelId { get; set; }
public virtual PersonalDetails CustomerPersonalDetails { get; set; }
public virtual AddressDetails CustomerAddressDetails{ get; set; }
public virtual FinanceDetails CustomerFinanceDetails{ get; set; }
}

Through trial and error, I’ve found that to use MVCWizard.Wizard, I have to create a “WizardManager” per subsection of pages I’d like to display (so one WizardManager, controller, partial views etc. for CustomerPersonalDetails, one for CustomerAddressDetails and so on..)

..so far so good..

Creating the controller for each subsection inherits from WizardController T, where T is the model. What I’d like to do is code the controller each subsection uses to accept the MainModel in its entirity, and from there just pass MainModel.Child to each partialview as required (the way the MVCWizard.Wizard seems to require)

Doing it this way, it all compiles ok but in use, navigating back and forth between the wizard pages (partial views) the data in base.Wizard().WizardModel is getting wiped out.

I found, that to get it to retain data in the Base.Wizard().WizardModel when navigating back and forth, I have to explicitly specify the child class type for each WizardManager..

So.. (Controller)

public MyController : WizardManager < MainModel >...
public PartialViewResult SubsectionPage1(MainModel mdl)..

(View)

@model MainModel
CustName:  @Html.TextBoxFor(m => m.CustomerPersonalDetails.CustName) 

..looks like it works, but data isn’t retained.. however..

(Controller)

public MyController : WizardManager< PersonalDetails >...
public PartialViewResult SubsectionPage1(PersonalDetails details)..

(View)

@model PersonalDetails
CustName:  @Html.TextBoxFor(m => m.CustName) 

Works just fine… is there something I’m missing why the MVCWizard.Wizard can’t seem to handle “complex” models which hold one or more “child” types? Ultimately I can code it so I pass these smaller models to the WizardManager and then combine and map them across to my domain model before persisting to the datastore, but I’d be grateful for an explanation..

* EDIT *

Ok, I’ve dug around a bit more and that initial model binding should work just fine within most normal circumstances. But when using MVCWizard.Wizard, the issue seems to be with the “EnableSimpleMerge” feature of the MVCWizard.Wizard. Its used during the page navigation and there seems to be an issue with how that merge function uses reflection to discover the properies within the model. From my initial look, it doesn’t appear to be coded to recurse through and “discover” child objects within a more complex model structure..

private void Merge(T wizard, T model)
        {
            foreach (PropertyInfo info in model.GetType().GetProperties())
            {
                object obj2 = info.GetGetMethod().Invoke(model, null);
                if (obj2 != null)
                {
                    wizard.GetType().GetProperty(info.Name).GetSetMethod().Invoke(wizard, new object[] { obj2 });
                }
            }
            foreach (FieldInfo info3 in model.GetType().GetFields())
            {
                object obj3 = info3.GetValue(model);
                if (obj3 != null)
                {
                    wizard.GetType().GetField(info3.Name).SetValue(wizard, obj3);
                }
            }
        }
  • 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-11T04:51:33+00:00Added an answer on June 11, 2026 at 4:51 am

    (See comment above 🙂

    A more detailed Merge method needed to be written using indepth property reflection

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

Sidebar

Related Questions

I'm trying to use Rails(2)'s to_json model serializing mechanism to emit some data from
I have some test code that i'm just trying to use to figure out
It's part curiosity and part because I was just trying to use this. If
I'm just trying to use some basic Isolated Storage functionality and I keep getting
I am just trying to use the OR function in Excel for analyzing some
I am trying to use mysqli for the first time because i have some
I was just trying to use Robotium in an Android JUnit Test, but the
I'm trying to use a select with an onChange event and I just need
I'm trying to use sed to clean up lines of URLs to extract just
I'm trying to use the following code (poorly written, but it's just a proof

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.