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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:54:02+00:00 2026-05-12T00:54:02+00:00

I am getting the following Error The model item passed into the dictionary is

  • 0

I am getting the following Error
The model item passed into the dictionary is of type ‘MvcWebApplication.Models.Product’ but this dictionary requires a model item of type ‘MvcWebApplication.ViewModels.ProductCommonViewModel’.

Controller Code is as follows:-

public ActionResult Index([Bind(Prefix= "MvcWebApplication.ViewModels.ProductCommonViewModel")] Product product)
View Model class sent to the View:
namespace MvcWebApplication.ViewModels
{
    public class ProductCommonViewModel
    {
        public Product Product { get; set; }
    }
}

Model Binder :

namespace MvcWebApplication.ModelBinders
{
    public class ProductBinder : IModelBinder
    {
        #region IModelBinder Members

        public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            HttpRequestBase fc = controllerContext.HttpContext.Request;

            Product product = new Product();
            LaunchSheet launchSheet = null; ;
            ProductPricing productPricing = null;

            product.LoanTypeId = Convert.ToInt32(fc["rblLoanType"]);
            product.ProductTypeId = Convert.ToInt32(fc["ddlproductType"]);
etc...
            return Product;
          }
      }
}

Product Class

[ModelBinder(typeof(ProductBinder))]
    public partial class Product : IRuleEntity
    {

}

What am I doing wrong?

  • 1 1 Answer
  • 1 View
  • 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-12T00:54:03+00:00Added an answer on May 12, 2026 at 12:54 am

    It’s not the binding which is broken. The problem is that your strongly-typed view (aspx/ascx) requires a model of type MvcWebApplication.ViewModels.ProductCommonViewModel, but the action which renders it is passing a model of type MvcWebApplication.Models.Product. Note that this has nothing to do with the code in your question; the bug is in the “return View(model)” line elsewhere.

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

Sidebar

Related Questions

We are getting following error when we try to validate our app. This bundle
Am trying to insert XML into XML Column.. getting following error: . Msg 6819,
I am getting this following error , when i am tring to having two
This is a HW problem. I keep getting the following error on screen related
I'm getting the following error: undefined method `id' for #<Array:0x00000101ff0b70> On this line: <%=
I am getting the following error when my application runs: System.InvalidOperationException: The type 'ContactModels+Contact'
I was getting the following error when runing such this code: var dbContext =
I'm getting the following error in a Joomla model file: unexpected T_VARIABLE, expecting T_FUNCTION
I am getting the following error. It doesn't happen to all the time, but
I'm getting the following error: The type arguments for method 'System.Web.Mvc.Html.DisplayExtensions.DisplayFor<TModel,TValue>(System.Web.Mvc.HtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel,TValue>>, string)' cannot

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.