batwadi
batwadi

Reputation: 1906

ASP.NET MVC Model is not populating

I am binding Model to the view and its working fine when populating the view but on post back its not sending any data to controllers

  [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult InfoNext(MyModel ModelDep)
        {

In the aspx view i am binding properly

<%@ Page Title="Information" Language="C#" MasterPageFile="~/Views/Shared/Some.Master"
    Inherits="System.Web.Mvc.ViewPage<MyModel>" %>

Issue is ModelDep is not having any updated values from View

Upvotes: 0

Views: 220

Answers (1)

John Rasch
John Rasch

Reputation: 63435

I'm guessing:

Inherits="System.Web.Mvc.ViewPage<MyModels>"

should be:

Inherits="System.Web.Mvc.ViewPage<MyModel>"

Upvotes: 2

Related Questions