Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the Index.cshtml calling upon itself. It gives me a HTTP 404 error. Is there any way to do this call without this error?
XML
<form action="@Url.Action("Index", new { Idt=1, submitfn = "Add" })" method="Post"><input type="submit" id="AddTo" value="Add To" /></form><br /><br /><br />
Posted
Comments
virang_21 2-Feb-15 20:44pm    
Do you have HttpPost ActionResult for Index defined in your Index controller ?
[HttpPost]
ActionResult Index()
{
return View();
}
teledexterus 2-Feb-15 21:20pm    
Yes,
private testContext db = new testContext();
List<Table1> thistable = new List<Table1>();
[HttpPost]
public ActionResult Index(int Idt, string col01, string col02, string col03, string submitfn)
{
...
return View(thistable);
}
virang_21 2-Feb-15 23:31pm    
your this Index method is expecting more input fields then the one you are passing. Where is the value for col01,col02 and col03 ?

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