Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Dear Team,

I am posting my entire model to the controller from the view,

this is what i did,

1.initially i am loading drop down list values using enumerable

2. after the view loading with default values , and I am entering textbox values

3. submitted

after that model passed to controller , but the model is contains only the default value s which is initially loaded not the value is entered by me

form my view
-------------
<%using (Ajax.BeginForm("Ince_setup", "Incentive", new AjaxOptions { HttpMethod = "POST"}))
{ %>

//controls

<%}%>

controller
-----------
C#
[HttpPost]
       public ActionResult Ince_setup(read_Incen Inc_plan, string command)
       {

}



model
-----
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Distributor.Models
{
 public class read_Incentive
    {

property with get and set
}



i cant able to find the error


help me soon ASAP please,

Regards,
Velsamy A
Posted
Comments
Sinisa Hajnal 3-Feb-16 2:40am    
Assuming read_Incen is just your shorthand for read_Incentive, not real code? Or you have two classes with similar names and you forgot to change the type?
avelsamy 3-Feb-16 3:45am    
"public class read_Incen" this is my model class

previously i typed wrongly
Anisuzzaman Sumon 3-Feb-16 4:51am    
Show more code of your View

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900