asp.net mvc post variable to controller
- by Erwin
Hello fellow programmer
I came from PHP language(codeigniter), but now I learning ASP.Net MVC :)
In PHP codeigniter we can catch the post variable easily with
$this->input->post("theinput");
I know that in ASP.Net MVC we can create an action method that will accepts variable from post request like this
public ActionResult Edit(string theinput)
Or by
public ActionResult Edit(FormCollection formCol)
Is there a way to catch post variable in ASP.Net like PHP's codeigniter, so that we don't have to write FormCollection object nor have to write parameter in the action method (because it can get very crowded there if we pass many variable into it)
Is there a simple getter method from ASP.Net to catch these post variables?